Read from standard input
suggest changecat < file.txt
The output is the same as cat file.txt, but cat reads the file from standard input instead of opening it itself.
printf "first line\nSecond line\n" | cat -n
The printf before | writes two lines. cat adds line numbers to that output.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents