Skip to content

Instantly share code, notes, and snippets.

@camdez
Created February 13, 2012 18:15
Show Gist options
  • Save camdez/1818775 to your computer and use it in GitHub Desktop.
Save camdez/1818775 to your computer and use it in GitHub Desktop.
whiteout.sh - Clean up the whitespace in a file
#!/bin/bash
# whiteout.sh - Clean up the whitespace in a file
#
# Author: Cameron Desautels <[email protected]>
# Date: 2012-02-12 20:25:08
if [ -z "$1" ]
then
echo "Usage: `basename $0` file [...]" 1>&2
exit 1
fi
sed -i '' 's/[[:space:]]*$//' $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment