Go to the first, previous, next, last section, table of contents.

awkプログラムの実行方法

awkプログラムの実行にはいくつかの方法があります。プログラムが短い場合は、次のように、awkを実行するコマンドの中にプログラムを含めてしまうのが最も簡単です。

awk 'program' input-file input-file2 ...

programは、前述したように一連のパターンとアクションで構成されます。

プログラムが大きい場合は、プログラムをファイルに入れて、次のようなコマンドで実行すると良いでしょう。

awk -f program-file input-file1 input-file2 ...

Go to the first, previous, next, last section, table of contents.