Skip to content

Instantly share code, notes, and snippets.

@mattrobmattrob
Created July 7, 2015 20:39
Show Gist options
  • Save mattrobmattrob/20f746817aaa2e2e3ab9 to your computer and use it in GitHub Desktop.
Save mattrobmattrob/20f746817aaa2e2e3ab9 to your computer and use it in GitHub Desktop.
Add correct line endings to make Git diff work better
#!/bin/bash
FILES=~/Path/To/Folder/With/Files
for f in $FILES
do
echo "Processing $f file..."
# take action on each file. $f stores current file name.
ed -s $f <<< w
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment