Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 2002 20:31:59 +0100
From:      Norbert Koch <viteno@t-online.de>
To:        adrian kok <adriankok2000@yahoo.com.hk>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: please help: how do I replace words
Message-ID:  <vzn0o2lnww.fsf@viteno.dyns.net>
In-Reply-To: <20021121192354.42378.qmail@web21207.mail.yahoo.com> (adrian kok's message of "Fri, 22 Nov 2002 03:23:54 %2B0800 (CST)")
References:  <20021121192354.42378.qmail@web21207.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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

norbert.

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?vzn0o2lnww.fsf>