LoginSignup
2
0

More than 5 years have passed since last update.

ずんだの表見出し++問題 awkワンライナー 編

Last updated at Posted at 2018-10-23

元ネタ:
ずんだの表見出し++問題 Ruby 編
ずんだの表見出し++問題 Go編

プログラム

echo -e "0|col1|col2|col3\n1|col1|col2|col3\n2|col1|col2|col3\n3|col1|col2|col3\n4|col1|col2|col3" | awk 'BEGIN {FS="|";OFS="|"} {print $1+1,$2,$3,$4}'

出力

1|col1|col2|col3
2|col1|col2|col3
3|col1|col2|col3
4|col1|col2|col3
5|col1|col2|col3
2
0
0

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
2
0