Skip to content

Instantly share code, notes, and snippets.

@timwhitlock
Created August 4, 2015 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timwhitlock/d545917d0b143abb3648 to your computer and use it in GitHub Desktop.
Save timwhitlock/d545917d0b143abb3648 to your computer and use it in GitHub Desktop.
Simple dos2unix script
#!/bin/bash
# Actually just strips carriage returns
cp -p "$1" "$1.dos"
tr -d '\r' < "$1.dos" > "$1"
rm -f "$1.dos"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment