September 2015
Intermediate to advanced
200 pages
6h 40m
English
In text processing utilities that act as filters and are designed to be run from the command line, it’s common—standard, even—to accept input both from standard input and from files. Take perhaps the simplest of all such tools: cat. If you pass it standard input, it outputs standard input:
| | $ echo "hello from standard input" | cat |
| | hello from standard input |
If, on the other hand, you pass it filenames as arguments, it will output the contents of those files:
| | $ echo "hello from file one" > one.txt |
| | $ echo "hello from file two" > two.txt |
| | $ cat one.txt two.txt |
| | hello from file one |
| | hello from file two |
This behavior is a great courtesy to the end users of ...
Read now
Unlock full access