読み込み中...
読み込み中...
GNU Awk公式マニュアルを根拠に、field、FS、NR、regexp、集計、rangeなど製品選定exact12を示す非網羅の静的リファレンス。
最終更新日 ・ by yuzlrin
GNU Awk manualを根拠にした、非網羅exact12の静的参照です。
| 項目 | 内容 |
|---|---|
| '{print $1}' | Print field 1 after the default whitespace field splitting. |
| '{print $NF}' | Print the final field in the current record. |
| -F, | Set FS to a comma before input is read. |
| -F'\t' | Set FS to a tab character before input is read. |
| 'NR==5' | Select total input record 5; the omitted action prints $0. |
| 'NR>1' | Select total input record 2 and later; the omitted action prints $0. |
| '/pattern/{print $2}' | For a record matching the regexp pattern, print field 2. |
| '{sum+=$1} END{print sum}' | Numerically convert and add field 1, then print sum in END. |
| 'BEGIN{OFS="\t"} {$1=$1; print}' | Set OFS to tab; assigning field 1 rebuilds $0 before print. |
| '!seen[$0]++' | Print only the first occurrence of each exact $0 through the omitted default action. |
| 'length($0)>80' | Select records whose $0 character count exceeds 80; this is not byte count or display width. |
| '/start/,/end/' | Select an inclusive range from a start-matching record through an end-matching record. |