-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

The Ultimate Linux Shell Scripting Guide
By :

I have some cool case studies on how to use sed
, grep
, and regular expressions in real life. So, read on and enjoy!
If you have more than one file that you need to modify in the same manner, you can have sed
do them all in one command, just by using a *
wildcard in the filename. Quite a few years ago I assisted a website maintainer in migrating a set of PHP-based websites from a CentOS 5 server to a CentOS 6 server. To make the sites work with the newer PHP version, she needed to add a line of new code to each .php
file. That could have been a bit problematic, because she had about 2,000 files to modify, which is more than you’d want to edit manually. I suggested that she use sed
to modify all files at once, and she knew immediately what I was talking about. (I jogged her memory by making the suggestion.)
About 15 years...