Skip to content

Instantly share code, notes, and snippets.

@thanosp
Created March 22, 2012 12:32
Show Gist options
  • Save thanosp/2158064 to your computer and use it in GitHub Desktop.
Save thanosp/2158064 to your computer and use it in GitHub Desktop.
Tabfix
tabfix()
{
if [ -z "$1" ]; then
echo -e 'Usage: tabfix [path]'
else
baseDir="$1"
find "$baseDir" -name "*.php" |while read line
do
expand -t 4 -i $line > $line.new
mv $line.new $line
echo "$line fixed"
done
fi;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment