D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] Help with sed

 

is it possible to use sed to find more than two different lines of a file.
ie I am having to hack out lines like

$database="blablabla";
$host="localhost";

from many php files
I can, using the _expression_ sed -e '/$host/,/$database/d' more.php  > more.txt as this woks fine.

but                                         sed -e '/$host/,/$database/,/$user/d' addveg.php  > more.txt
fails.  Am I on the right lines or not?

when it works ( I may have up to 10 different lines to remove) i want to put in a "include db.ini ;"  statement.


Regards

Kevin Lucas
Minions Post Master(Sub) reprieved (possibly!)
Po House, Minions,
Liskeard Cornwall
PL14 5LE
01579363386
-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html