Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 2004 23:34:32 +0100
From:      Volker Eckert <volkere@cs.tu-berlin.de>
To:        Rod Person <personrp@hotpop.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Sed Help.....
Message-ID:  <20041110223432.GG9457@conde.cs.tu-berlin.de>
In-Reply-To: <200411101443.01977.personrp@hotpop.com>
References:  <200411101443.01977.personrp@hotpop.com>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041110223432.GG9457>