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.
少なくとも1つのフィールドを持つ行のみを出力するawkコマンドを作成するにはどうすればよいですか?
awk '{if (NF>0) print }'
コマンドは機能し、1つ以上のフィールドを含む行を出力します。ただしawk、デフォルトで印刷されるため、簡略化できます。
awk
awk 'NF > 0' file.txt