We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

therobot on 10/08/07


Tagged

commands sed


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

arcturus
basicmagic


Replace some text in multiple files in a directory


Published in: Bash 


  1. sed -i.bak s/check_http_redirect_temporarily/check_http_redirect/ *

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: therobot on October 8, 2007
Posted By: therobot on October 8, 2007
Posted By: therobot on February 4, 2008

test

Posted By: therobot on February 4, 2008

For changing paths you can use other special character as separator: sed -i s:/usr/lib/nagios/plugins/:/usr/local/nagios/libexec/: *

You need to login to post a comment.