[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Searching for a text string RaQ3.



> This shell script uses find to recurse through the directories and locate
> *.htm files.  It calls sed to do the search and replace.  You can remove
> the "rm $i.bak" line if you wish to keep a backup copy of the files.
> 
> #! /bin/sh
> # filename: replaceall.sh
> find . -type f -name '*.htm' -print | while read i
> do
>         cp $i $i.bak &&
>         sed 's|@home|@attbi.com|g' ${i}.bak > $i
>         rm $i.bak
> done
> 
> (credits: Jim Dennis)
should that sed line be 
sed 's|@home.com|@attbi.com|g' ${i}.bak > $i
instead of 
sed 's|@home|@attbi.com|g' ${i}.bak > $i

???

paul

--sig
Agility Systems, Inc.
Developers of www.ourfaqsite.com 

Special Discounts of ourfaqsite.com accounts
for Webmasters up to 60% of the published 
account prices.
For info contact ourfaqsite@xxxxxxxxxxxxxxxxxx