Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
awk で 2 つの引数 (ファイルではない) から NF を取得しようとしましたが、成功しませんでした。
これはコマンドラインです:
awk -f the_program 12/12/2013 11/11/2014
ARGV[1] または ARGV[2] を getline にパイプして NF を取得する方法はありますか? NF を取得したかったので、他のことを行う前に引数を簡単に検証できます
欲しいのはこれだけですか?
$ awk 'BEGIN{ print ARGC - 1 }' 12/12/2013 11/11/2014 2
そうでない場合は、予想される出力を投稿し、その理由を説明してください。