Skip to content

Instantly share code, notes, and snippets.

@unfo
Created April 23, 2013 07:10
Show Gist options
  • Save unfo/5441434 to your computer and use it in GitHub Desktop.
Save unfo/5441434 to your computer and use it in GitHub Desktop.
Naive CR/CRLF checker script
#!/bin/bash
grep -r $'\r' -l $1 > /dev/null
if [ $? -eq 0 ]; then
echo "Windows"
else
echo "Linux"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment