引数とstdinの両方を入力に取るものと、片方のみ取るものとある
3種類ある
引数のみサポート
stdinのみサポート
引数とstdinの両方をサポート
manを読んで区別する
引数のみサポート
e.g. ls, cd
stdinのみサポート
e.g. sort, wc
引数とstdinの両方をサポート
e.g.
cat
If file is a single dash (‘-’) or absent, cat reads from the standard input. (ref. $ man cat)
無引数の時は、stdinから読み取る
grep
awk
関連
引数とstdinの違い