Daily Archives: January 24, 2012

SED: replace a pattern in all files in one command

Tweet I have a bunch of c files and I want to change the first line that appears as //something into /*something Using sed, you can use the command ‘s/old_pattern/new_pattern/g’ where -e stands for edition, and -i to apply the … Continue reading

Posted in Linux | Tagged | Leave a comment