O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10.9. Displaying control characters in a file

When downloading files from other systems, you sometimes get control characters (non-printable characters) spread all over the file. Capturing an application screen output from a menu can sometimes cause control characters to be put in a file. How can you tell if there are any in a file? If you do ‘ cat -v filename ’, and the screen bleeps and spurts rubbish everywhere, then be assured you’ve got control characters in that file. If you get funny looking characters being displayed then be pretty sure that they are control characters as well.

On some systems you can do just a ‘ cat filename ’ instead of cat -v to see all those non-printable characters.

The sed format is:

[address,[address]]l 

where ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required