You can use cat -e option to display non-printing (^ and M-) and $ at the end of line, this is equivalent to -vE option.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
## Add some content with non-printing and new lines to the file echo -e "non-printing \004\nwith new line" > myfile ## Display non-printing (^ and M-) and $ at the end of line cat -e myfile ## equivalent to -vE ## returns ## non-printing ^$ ## with new line$ ## Without any options cat myfile ## returns the original file contents ## returns ## non-printing ## with new line |