Are there other `cat` options?

QuestionsQuestions8 SkillsProDec, 11 2025
064

That's a great question! Yes, cat has several other useful options besides -n.

Here are a few common ones:

  • -b or --number-nonblank: Numbers all non-blank output lines, similar to -n but it skips empty lines.
  • -s or --squeeze-blank: Squeezes multiple adjacent blank lines into a single blank line. This is handy for cleaning up files with excessive empty lines.
  • -E or --show-ends: Displays a $ at the end of each line. This can be useful for debugging and seeing hidden spaces.
  • -T or --show-tabs: Displays ^I for TAB characters. Also useful for debugging formatting issues.
  • -v or --show-nonprinting: Displays non-printing characters (other than TAB and end of line) using ^ and M- notation.

You can learn more about cat and all its options by typing man cat in your terminal. This will bring up the manual page for the command.

Is there anything specific you are trying to achieve with cat that led you to ask about other options? Labby is here to help!

0 Comments

no data
Be the first to share your comment!