how long did this take me to write? way too frickin long.
#!/bin/sh list=`find -name "*.shtml"` for file in $list do echo Processing : $file mv $file $file.temp sed -e "s/regexpin/regexpout/gi" $file.temp > $file rm -f $file.temp done
random($foo) is the occassionally still updated blog of Leonard Lin. My pics are on Flickr, code is on Github. @lhl on Twitter. More »
how long did this take me to write? way too frickin long.
#!/bin/sh list=`find -name "*.shtml"` for file in $list do echo Processing : $file mv $file $file.temp sed -e "s/regexpin/regexpout/gi" $file.temp > $file rm -f $file.temp done