Cat/tac displays nothing but vi does

Hi,
Today i have seen a file which shows nothing when i use cat/tac.
But when i use vi it displays a single line at the top.
There are no other lines. I am curious why cat/tac doesn't display that line and only vi does?

Any thoughts?

Thanks in advance,

I guess there are non-printing characters in your input file.

Use -v option with cat to show non-printing characters:

cat -v file

For further reference check the man page:

man cat
1 Like