Skip to content

Instantly share code, notes, and snippets.

@bencevans
Created June 25, 2014 10:53
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 bencevans/1f536a90870fcae09153 to your computer and use it in GitHub Desktop.
Save bencevans/1f536a90870fcae09153 to your computer and use it in GitHub Desktop.
Tabs 2 Spaces + Remove Trailing Spaces in .js files
for file in split $(find -path "./*.js"); do
expand --tabs=2 $file | sed 's/[ \t]*$//' > "${file}_temp"
mv "${file}_temp" $file
rm "${file}_temp"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment