Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2003 01:26:38 -0700
From:      Chad Leigh -- Shire.Net LLC <chad@shire.net>
To:        Kok Kok <cckok002000@yahoo.ca>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: sed to replace the words
Message-ID:  <5883C98B-5464-11D7-BD73-003065A70D30@shire.net>
In-Reply-To: <20030312061655.26510.qmail@web13305.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tuesday, Mar 11, 2003, at 23:16 US/Mountain, Kok Kok wrote:

> Hi all
>
> I have question how to replace words using sed
>
> ./script 61.100 192.168
>
> The script is
> #!/bin/sh
> sed -e 's/$2/$1/g' file > newfile
>
> The problem is 192.168 can't replace 61.100 in the
> newfile

try ./script 61\.100 192\.168

Just a guess.  I am no guru, but have done some similar stuff 
recently...  (actually, I used sed for something similar to this, but 
perl for something almost exactly the same as this)

Chad

>
> Please help
>
> Thank you
>
>
>
>
> ______________________________________________________________________
> Post your free ad now! http://personals.yahoo.ca
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message


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?5883C98B-5464-11D7-BD73-003065A70D30>