Date: Thu, 21 Nov 2002 13:54:22 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Norbert Koch <viteno@t-online.de> Cc: adrian kok <adriankok2000@yahoo.com.hk>, freebsd-questions@FreeBSD.ORG Subject: Re: please help: how do I replace words Message-ID: <20021121195422.GD86807@dan.emsphone.com> In-Reply-To: <vzn0o2lnww.fsf@viteno.dyns.net> References: <20021121192354.42378.qmail@web21207.mail.yahoo.com> <vzn0o2lnww.fsf@viteno.dyns.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Nov 21), Norbert Koch said: > adrian kok <adriankok2000@yahoo.com.hk> writes: > > > I tried: > > > > sed -n 's/192.168.0.1/172.16.0.1/w abc.com.tmp' > > abc.com > > > > file abc.com.tmp > > only shows l line > > abc.com 172.16.0.1 > > and missing localhost.abc.com 127.0.0.1 > > sed 's/192.168.0.1/172.16.0.1/' abc.com > abc.com.tmp Also note that on FreeBSD 4.7 and newer, you can do an in-place update of a file with sed if you use the -i flag. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021121195422.GD86807>