Read from standard input

suggest change
cat < 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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents