LoginSignup
1
1

More than 1 year has passed since last update.

Linux コマンド awk がまじで毎回分からないのでいったん整理する

Last updated at Posted at 2019-01-07

Linux command hard to understand for me so wanna clear it
Linux コマンド awk がまじで毎回分からないのでいったん整理する

stdout and pipe awk command case

パイプで標準出力を受け取るケース

image

awk command arg as file case

awk コマンドに 引数として ファイルを指定するケース

image

in brace syntax is awk original

ブレースで囲まれた部分は awk 独自の記法

image

Dollar and numbers is split parts

ドルと数字は分割を扱う

image

Able to specify multiple parts

複数を出力することもできる

echo "a,b,c" | awk -F'\,' '{ print $1 $2 }'
ab

comma in awk syntax makes space separated text in stdout

awk 記法としてのカンマを使うと、結果も分割出力される

echo "a,b,c" | awk -F'\,' '{ print $1, $2 }'
a b

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

1
1
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
1
1