VOOZH about

URL: https://qiita.com/dll7/items/95440b17ea8397231607

⇱ n行ごとに処理をするワンライナー #AWK - Qiita


👁 Image
11

Go to list of users who liked

12

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 5 years have passed since last update.

@dll7(Koutarou Yabe)

n行ごとに処理をするワンライナー

11
Last updated at Posted at 2014-11-27

よくわからないので誰か教えてください。

一応、10行ごとに改行を入れるワンライナーはできたのですが、正直言ってダサすぎます。
ワンライナーを凄さを全然感じられないので誰かお願いします。

cat result.txt | awk 'begin{i=0} {print $1}{i++} {if(i%10==0){print ""}}'

トリッキーなのを待ってます

11

Go to list of users who liked

12
4

Go to list of comments

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11

Go to list of users who liked

12