Skip to content

Instantly share code, notes, and snippets.

@miebach
Created July 11, 2011 12:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miebach/1075728 to your computer and use it in GitHub Desktop.
Save miebach/1075728 to your computer and use it in GitHub Desktop.
Convert a DOS text-file to unix by removing cr and ^Z characters
#!/bin/sh
# remove cr and ^Z characters from a dos file:
# the codes are octal, oct15 = dec13 and oct32 = dec26
tr -d '\15\32' < winfile.txt > unixfile.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment