...
- In #2, the cat command "blocks" writing to its standard output until more says it's ready for more input
- This "write until block" / "read when input available" behavior makes streams a very efficient means of inter-process communication.
- In #1, more can report how much of the file has been read, e.g. --More-- (24%) because it has access to the size information for the file it is reading.
- But in #2, the text is "anonymous input" – from standard input – so more doesn't know how much of the total has been provided.
...
Tip |
---|
Note the slight difference when you give wc -l a file name versus when you pipe input to it.
|
What is text?
We've talked about viewing text using various Unix commands – but what exactly is text? That is, what is stored in files that the shell interprets as text?
...