4 ms·
The commands that read their input from standard input could be used as receiver in a pipeline. For instance: `A | B` is a short form of `A > tmp.txt; B < tmp.t
by ketanmaheshwari 6y ago
The commands that read their input from standard input could be used as receiver in a pipeline. For instance: `A | B` is a short form of `A > tmp.txt; B < tmp.txt; rm tmp.txt`
There are some commands that need literal arguments which is different than standard input. For instance the echo command. `echo < list.txt` will not work assuming you want to print the items inside the list. `echo itemA itemB itemC` will work. This is where xargs comes into play -- it converts the standard input stream to literal arguments among other things.
- nickthemagicman 6y agoHow do you know which ones receive input from standard input or how can you find out efficiently?
- ketanmaheshwari 6y agoThe man page of the command helps in most cases. Often the description section has info if the command reads from standard input, a file or both.