Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2007 17:04:24 +0000
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        Halid Faith <maslak@ihlas.net.tr>, freebsd-questions@freebsd.org
Subject:   Re: How to replace two strings in a file in the same time with sed command ?
Message-ID:  <475EC318.90104@dial.pipex.com>
In-Reply-To: <002801c83c11$cd434e70$dc96eed5@ihlasnetym>
References:  <002801c83c11$cd434e70$dc96eed5@ihlasnetym>

next in thread | previous in thread | raw e-mail | index | archive | help
Halid Faith wrote:

>I want to replace two or more strings in a file in the same time with sed command.
>How do I that ?
>  
>
Do you mean something like:

sed -e 's/string1/replacement1/g' -e 's/string2/replacement2/g'

or

sed -f instructions.sed

instructions.sed:

s/string1/replacement1/g
s/string2/replacement2/g

--Alex




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?475EC318.90104>