Shantanu Oak ([info]shantanuo) wrote,
@ 2008-11-20 14:38:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Current mood:nerdy
Entry tags:linux

Remove junk in Linux
Sometimes you'll end up with carriage returns on each line in a file originally created on a DOS/Windows system, or filenames with spaces, tab, or other control characters in them, but you can't see them typically.
The cat command provides three useful options -v, -e, and -t that will let you understand these invisible characters
-v (displays non-printing characters)
-e (prints a "$" at the end of each line to indicate a NL character)
-t (prints "^I" for each Tab in the file)
cat -vet filename |more




Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…