Replacing Methods

Hehe, it might sound really ridiculous to some but this is how you replace a word in all select file types and backup the existing file into a extension called .bak

% ruby -i.bak -pe 'sub "foo", "bar"' *.[ch]

but this is for ruby though. :P still yet to figure out for unix. I think its time for me to install ubuntu again.

Comments

Popular posts from this blog

Chat Tu Chak Market

Rainy Saturday