Skip to content

Instantly share code, notes, and snippets.

@jonseymour
Created April 25, 2011 04:00
Show Gist options
  • Save jonseymour/940136 to your computer and use it in GitHub Desktop.
Save jonseymour/940136 to your computer and use it in GitHub Desktop.
clean trailing whitespace
clean_ws()
{
[ "$1" ] || exit 1;
sed "s/ *\$//" < $1 > $$.tmp && mv $$.tmp $1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment