#!/bin/ksh # # $Id: fixlog,v 1.1 2007/11/30 02:11:19 vogelke Exp $ # # update old logfiles to dump tabs. PATH=/bin:/usr/bin:/usr/local/bin export PATH TAB=`echo ' ' | tr ' ' '\011'` # God I hate tabs... for file in $* do if grep "$TAB" $file > /dev/null then # save old permissions; should be 444 but who knows. perm=`gfind "$file" -printf "%m\n"` expand -4 $file > $file.$$ && mv -f $file.$$ $file && chmod $perm $file else echo skipping $file fi done exit 0