LoginSignup
12

More than 5 years have passed since last update.

posted at

updated at

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

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

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

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

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

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
What you can do with signing up
12