Hi
Can I know how to use sed to substitue 2 instead of 1 at the same time?
eg:
sed 's/pchloe.com/abc.com/ ; /192.92.123.5/10.10.0.3/g' orgfile >> newfile
thank you
__________________________________________________________________ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
On Tue, 9 Mar 2010, chloe K wrote:
Hi
Can I know how to use sed to substitue 2 instead of 1 at the same time?
eg:
sed 's/pchloe.com/abc.com/ ; /192.92.123.5/10.10.0.3/g' orgfile >> newfile
sed \ -e 's/pchloe.com/abc.com/g' \ -e 's/192.92.123.5/10.10.0.3/g' \ orgfile >> newfile
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Paul Heinlein Sent: Tuesday, March 09, 2010 11:08 AM To: CentOS mailing list Subject: Re: [CentOS] sed help
On Tue, 9 Mar 2010, chloe K wrote:
Hi
Can I know how to use sed to substitue 2 instead of 1 at the same time?
eg:
sed 's/pchloe.com/abc.com/ ; /192.92.123.5/10.10.0.3/g' orgfile >>
newfile
sed \ -e 's/pchloe.com/abc.com/g' \ -e 's/192.92.123.5/10.10.0.3/g' \ orgfile >> newfile
-- Paul Heinlein <> heinlein@madboa.com <> http://www.madboa.com/ _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
You can also use semi colons for example:
sed 's/pchloe.com/abc.com/; s/192.92.123.5/10.10.0.3/g' orgfile >> newfile
Dan