Software Stuff

There's a heck of a lot of useful information out on the web, which is great because I'm constantly needing to work out how to bust through software engineering problems. Sometimes I need to refer back to the original solutions, so this blog is really just a notebook to capture that information.

So Who Is This Geekbrit Guy Anyway?   Ask me stuff, tell me stuff   Submit

Linux Shell Global Search & Replace

Replace String in all files matched by grep:

perl -p -i -e ‘s/oldstring/newstring/g’ `grep -ril searchpattern *`

Same thing - recursive below start folder

find -name ‘*.html’ -print -exec sed -i.bak ‘s/foo/bar/g’ {} \;


  1. geekbrit posted this