On Mon, Jan 13, 2003 at 11:08:38AM +1000, [EMAIL PROTECTED] wrote:
> Hi all,
> Is there a way to remove all control characters from a file?
> eg: I have a file that has characters: ^M, ^@, ^L, etc which need to be 
> removed, but the file also contains: � and alike that need to stay.
> How could I accomplish this?

You can remove specific ones using tr:

cat root.tdh | tr -d '\015'

Would remove all ^M chars from the output...

see http://www.encypher.net/ascii/ for an ascii table. (Sorry for the
poor contrast, must fix that some time)

-Colin

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to