From owner-freebsd-questions@FreeBSD.ORG Wed Nov 10 22:34:37 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 A60AB16A4CE for ; Wed, 10 Nov 2004 22:34:37 +0000 (GMT) Received: from mail.cs.tu-berlin.de (mail.cs.tu-berlin.de [130.149.17.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id D64A343D53 for ; Wed, 10 Nov 2004 22:34:36 +0000 (GMT) (envelope-from volkere@cs.tu-berlin.de) Received: from mailhost.cs.tu-berlin.de (postfix@mail.cs.tu-berlin.de [130.149.17.13]) by mail.cs.tu-berlin.de (8.9.3p2/8.9.3) with ESMTP id XAA14117; Wed, 10 Nov 2004 23:34:35 +0100 (MET) Received: from localhost (localhost [127.0.0.1]) by mailhost.cs.tu-berlin.de (Postfix) with ESMTP id E246BF20D; Wed, 10 Nov 2004 23:34:34 +0100 (MET) Received: from mailhost.cs.tu-berlin.de ([127.0.0.1]) by localhost (bueno [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id 13792-29; Wed, 10 Nov 2004 23:34:33 +0100 (MET) Received: from conde.cs.tu-berlin.de (conde.cs.tu-berlin.de [130.149.17.40]) by mailhost.cs.tu-berlin.de (Postfix) with ESMTP; Wed, 10 Nov 2004 23:34:32 +0100 (MET) Received: (from volkere@localhost)iAAMYW5j029677; Wed, 10 Nov 2004 23:34:32 +0100 (MET) Date: Wed, 10 Nov 2004 23:34:32 +0100 From: Volker Eckert To: Rod Person Message-ID: <20041110223432.GG9457@conde.cs.tu-berlin.de> References: <200411101443.01977.personrp@hotpop.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200411101443.01977.personrp@hotpop.com> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at cs.tu-berlin.de 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 22:34:37 -0000 On Wed, Nov 10, 2004 at 02:43:01PM +0000, Rod Person wrote: > > 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' ^^^^^^^^^^^^^^^^^^^^^^^ my guess is: after expanding $REPLACELINE your command looks like you see above, which is not what you wanted. proposed solution: use other delimiters for sed.