Last active
August 29, 2015 14:05
-
-
Save peterfpeterson/39b4abe7706cfe83f735 to your computer and use it in GitHub Desktop.
Two lines of sed in a bash script to fix up whitespace in files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# remove all trailing whitespace | |
sed -i 's/[ \t]*$//' $1 | |
# replace tabs with 4 places | |
sed -i 's/[\t]/ /g' $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment