What are some common parameters used with the cat command?

Here are some common parameters (options) used with the cat command:

  1. -n: Number all output lines.

    cat -n filename.txt
  2. -E: Display a dollar sign ($) at the end of each line.

    cat -E filename.txt
  3. -b: Number non-blank output lines only.

    cat -b filename.txt
  4. -s: Suppress repeated empty output lines.

    cat -s filename.txt
  5. -T: Display TAB characters as ^I.

    cat -T filename.txt
  6. -v: Use ^ and M- notation for non-printing characters, except for line feed and TAB.

    cat -v filename.txt

These options enhance the functionality of the cat command, allowing for better control over how file contents are displayed and manipulated. If you have more questions or need further details, feel free to ask!

0 Comments

no data
Be the first to share your comment!