Skip to content

Instantly share code, notes, and snippets.

@AlexChittock
Created December 13, 2013 18:10
Show Gist options
  • Save AlexChittock/7948587 to your computer and use it in GitHub Desktop.
Save AlexChittock/7948587 to your computer and use it in GitHub Desktop.
Tool for converting line-endings across a number of files. Requires dos2unix.
#!/bin/bash
if [[ $# -ne 1]]; then
echo "usage: line-endings.sh file-pattern"
echo "while file-pattern is a glob-like pattern to match files to"
echo
exit 1
fi
find . -path $1 | xargs dos2unix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment