Fighting Absurdity With Absurdity:
THIS SITE AND ALL CONTENT THEREIN IS ENTIRELY PERSONAL IN NATURE; THEREFORE THE OPINIONS, COMMENTS, BELIEFS, ET CETERA THEREIN MAY NOT BE CONSTRUED AS BEING THAT OR ENDORSED BY ANY EMPLOYER OF MINE, PAST, PRESENT OR FUTURE, THOR, MARS, THE FLYING SPAGHETTI MONSTER, OR THAT BUM WHO JUST BILKED YOU OUT OF A CIGARETTE. BY THE WAY, THAT DUDE MAKES MORE PANHANDLING THAN YOU DO AT YOUR OFFICE JOB.
You have forgotten something.
Replace Text In a File In-Place With Sed
Yeah, yeah, this is common knowledge – but I always forget the proper syntax. :p
Anyhow, say you’ve got a file with ICANHAZCHEEZBURGRZ somewhere in it, and you want to replace that hilarious phrase. Here’s what you do:
sed -i 's/ICANHAZCHEEZBURGRZ/IHAZACHEEZBURGR/' filename
This will replace ‘ICANHAZCHEEZBURGRZ’ with ‘IHAZACHEEZBURGR’.
Such a thing is extremely useful when scripting the configuration of an insane amount of systems. (*wink wink, nudge nudge*)
Note: Still working out comments/etc. theming. Please ignore the ugliness.