From owner-freebsd-questions Tue Mar 11 22:19:13 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAEB737B401 for ; Tue, 11 Mar 2003 22:19:12 -0800 (PST) Received: from web13305.mail.yahoo.com (web13305.mail.yahoo.com [216.136.175.41]) by mx1.FreeBSD.org (Postfix) with SMTP id 4561843FB1 for ; Tue, 11 Mar 2003 22:19:12 -0800 (PST) (envelope-from cckok002000@yahoo.ca) Message-ID: <20030312061655.26510.qmail@web13305.mail.yahoo.com> Received: from [64.141.32.2] by web13305.mail.yahoo.com via HTTP; Wed, 12 Mar 2003 01:16:55 EST Date: Wed, 12 Mar 2003 01:16:55 -0500 (EST) From: Kok Kok Subject: sed to replace the words To: freebsd-questions@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 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