file AWK

awk '/pattern/ {action}' file

id:  Output: > out.txt
 
cmdline: ./E C J K S raw 
current : /home/users/2/boy.jp-soy/web/tools/grep  

OUTPUT

ERROR

# パターンで行を抽出 ※grep awk '/guess/'
# 特定の列が特定の文字列 awk '$1=="can" && $2~/^be/'
# フォーマットで数字を出力 awk '{sprintf("%04d", NR);}'
# 偶数行のみをパイプで抽出 awk 'NR % 2==0 { print NR " " $0; }'
# awk 'pattern {action}' [input] awk '/bar/ { print $0 }' foo.txt
# -F 区切り文字指定 awk -F, '{print $2}'; awk -F'\t' '{print $2}'
target=
SESSION
echo variablesecho global variables