To reiterate: the UNIX philosophy for a program that handles input is to get that a) from the input filename that is specified as part of the command line, or, if there is no filename specified on the command line, b) from the input stream. The most obvious example I can think of (and there are many others) is the utility less. You can specify a filename (or a file mask), and less will open and display each of those files. If no filename is supplied, it waits for an input stream (like the command ls -lrt | less) and displays that, a page at a time.
In reply to Re: Warn if STDIN pipe is missing or unwanted
by talexb
in thread Warn if STDIN pipe is missing or unwanted
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |