Sed Help.....
Miguel Mendez
flynn at energyhq.es.eu.org
Wed Nov 10 12:02:57 PST 2004
On Wed, 10 Nov 2004 14:43:01 +0000
Rod Person <personrp at hotpop.com> 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 at g'
Cheers,
--
Miguel Mendez <flynn at energyhq.es.eu.org> | 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20041110/7903cb1b/attachment.bin
More information about the freebsd-questions
mailing list