Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 2004 15:15:49 +0000
From:      Rod Person <personrp@hotpop.com>
To:        mailing lists at MacTutor <lists@mactutor.biz>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Sed Help.....
Message-ID:  <200411101515.49950.personrp@hotpop.com>
In-Reply-To: <D8431F26-3352-11D9-91B4-000D9347C178@mactutor.biz>
References:  <200411101443.01977.personrp@hotpop.com> <D8431F26-3352-11D9-91B4-000D9347C178@mactutor.biz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 10 November 2004 7:58 pm, mailing lists at MacTutor wrote:
> Rod,
>
> Take a look at what the shell replacement is actually doing. If you
> were to write the line manually it would look like this:
>
> sed -e 's/\/usr\X11R6\/bin\/xdm/\/usr\/local\/bin\/kdm/g' ...
>
> Right?
>
> But the shell doesn't escape the path separators (slashes). You need to
> escape them yourself in the variable assignments. Like this,
>
> KDMLINE='\/usr\/local\/bin\/kdm'
> &c
>
> And if there is only one occurrence per line, then you don't need the
> 'g' modifier.
>
> Hope that helps.
>
> Alex


Thanks Alex and Miguel...

I hate when you look at something for hours and it something you know you 
should have known! I had at one point had the variables with double qoute and
even tried to escape the qoutes!!

Thanks again

Rod...



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