Skip to content

Instantly share code, notes, and snippets.

@mattak
Last active September 3, 2018 03:55
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 mattak/e7e803d3153ef289f15da8d646a52e04 to your computer and use it in GitHub Desktop.
Save mattak/e7e803d3153ef289f15da8d646a52e04 to your computer and use it in GitHub Desktop.
Replace CR line feeding file to linux style line feeding file on unity project
#!/bin/sh
for f in $(find Assets -type f -name '*.cs' | grep -v Modules);
do
WIN_LINE_FEED=$(nkf --guess $f | grep "CR")
if [ "$WIN_LINE_FEED" != "" ]; then
echo $f
nkf -Lu --overwrite $f
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment