LoginSignup
11
12

More than 5 years have passed since last update.

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

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
12
4

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
12