How to combine `cat` options?

058

You can combine multiple options in the cat command by simply listing them together. The order of the options does not matter. Here’s how to do it:

For example, if you want to number all lines, show tabs, and display line endings, you can use:

cat -n -T -E filename.txt

Alternatively, you can combine them into a single option string:

cat -nTE filename.txt

Both commands will achieve the same result, displaying the contents of filename.txt with line numbers, tabs shown as ^I, and line endings marked with $.

0 Comments

no data
Be the first to share your comment!