Some other options for the cat command are as follows:
- -n: Add line numbers to output.
- -b: Add line numbers to output but do not number blank lines.
- -v: Display nonprinting and control characters.
- -e: Print a dollar sign ($) at the end of each line of output. Must be used with the -v option.
- -t: Print a ^I for each tab and ^L for each form feed. Must be used with the -v option.
- -s: On most systems this option causes cat not to print error messages about non-existent files. On some older systems -s causes cat to skip blank lines in the output.
- -u: Do not buffer output. By default, output is buffered in blocks or screen lines.
Editor's note: For more information on the "cat" command, read this expert response from Nigel McFarlane.
This was first published in August 2004