Skip to content

Instantly share code, notes, and snippets.

@shellj
Forked from jappy/dos2unix.sh
Created January 5, 2021 09:16
Show Gist options
  • Save shellj/f7f6e81f12443167ec4bd3c4882748a4 to your computer and use it in GitHub Desktop.
Save shellj/f7f6e81f12443167ec4bd3c4882748a4 to your computer and use it in GitHub Desktop.
Shell script to convert files with CRLF to LF (Mac/Linux)
#! /bin/sh
for x
do
echo "Converting $x"
tr -d '\015' < "$x" > "tmp.$x"
mv "tmp.$x" "$x"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment