I dont see the error!
am 20.12.2007 00:27:07 von RickM
>sed "s/\"GDSII_FILE2\"/\strmout\/$LC_NAME.gds2\""/g" lvl.rsf
sed: -e expression #1, char 25: unknown option to `s'
strmout\/$LC_NAME fails only with a forward slash. Any other
charactor works.
What dont I see?
Re: I dont see the error!
am 20.12.2007 00:53:50 von Ed Morton
On 12/19/2007 5:27 PM, rickm@galaxy.nsc.com wrote:
> >sed "s/\"GDSII_FILE2\"/\strmout\/$LC_NAME.gds2\""/g" lvl.rsf
>
> sed: -e expression #1, char 25: unknown option to `s'
>
> strmout\/$LC_NAME fails only with a forward slash. Any other
> charactor works.
> What dont I see?
>
I'm surprised that's the only way it fails. You have too many double quotes. Or
rather, one in the wrong place. Try this:
sed -e "s/\"GDSII_FILE2\"/\"strmout\/$LC_NAME.gds2\"/g" lvl.rsf
This is still susceptible to bizarre failure reports based on the value of
"$LC_NAME" (e.g. try that statement if LC_NAME contains a newline). This is more
robust:
awk -v rep="strmout/$LC_NAME.gds2" 'gsub(/"GDSII_FILE2"/,"\""rep"\"")1' lvl.rsf
Regards,
Ed.