Sed Help.....

Rod Person personrp at hotpop.com
Wed Nov 10 12:16:26 PST 2004


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...



More information about the freebsd-questions mailing list