From owner-freebsd-questions@FreeBSD.ORG Wed Nov 10 20:02:57 2004 Return-Path: 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 4B14216A4CE for ; Wed, 10 Nov 2004 20:02:57 +0000 (GMT) Received: from mindfields.energyhq.es.eu.org (73.Red-213-97-200.pooles.rima-tde.net [213.97.200.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDBFB43D1F for ; Wed, 10 Nov 2004 20:02:55 +0000 (GMT) (envelope-from flynn@energyhq.es.eu.org) Received: from scienide.energyhq.es.eu.org (scienide.energyhq.es.eu.org [192.168.100.1]) by mindfields.energyhq.es.eu.org (Postfix) with SMTP id 8F2AD356DC; Wed, 10 Nov 2004 21:02:54 +0100 (CET) Date: Wed, 10 Nov 2004 21:02:44 +0100 From: Miguel Mendez To: personrp@hotpop.com Message-Id: <20041110210244.359a885f.flynn@energyhq.es.eu.org> In-Reply-To: <200411101443.01977.personrp@hotpop.com> References: <200411101443.01977.personrp@hotpop.com> X-Mailer: Sylpheed version 0.9.99-gtk2-20041024 (GTK+ 2.4.13; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="Signature=_Wed__10_Nov_2004_21_02_44_+0100_aWbmBt1ImK5fzX.p" cc: freebsd-questions@freebsd.org Subject: Re: Sed Help..... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 20:02:57 -0000 --Signature=_Wed__10_Nov_2004_21_02_44_+0100_aWbmBt1ImK5fzX.p Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit On Wed, 10 Nov 2004 14:43:01 +0000 Rod Person wrote: Hi, > KDMLINE="/usr/local/bin/kdm -nodaemon" > REPLACELINE="/usr/X11R6/bin/xdm -nodaemon" > > sed -e "s/$REPLACELINE/$KDMLINE/g" /etc/test/ttys > /etc/test/new > > Here is the error I'm getting: > sed: 1: "s//usr/X11R6/bin/xdm -n ...": bad flag in substitute > command: 'X' > Both strings contain /, so you have to either escape it "\/" or use different command separator, e.g. 's@$REPLACELINE@$KDMLINE@g' Cheers, -- Miguel Mendez | Extreme ways are back again http://www.energyhq.es.eu.org | Extreme places I didn't know PGP Key: 0xDC8514F1 | I broke everything new again Note: All HTML mail goes to /dev/null | Everything that I'd owned --Signature=_Wed__10_Nov_2004_21_02_44_+0100_aWbmBt1ImK5fzX.p Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBknPonLctrNyFFPERAhyHAJ9Cu3HDnWRfLSCvoF3ocqZijnRd2gCgkFy2 Vkg0jT7hA4rYGPd9LPtOG0c= =1LWe -----END PGP SIGNATURE----- --Signature=_Wed__10_Nov_2004_21_02_44_+0100_aWbmBt1ImK5fzX.p--