|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
>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? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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. |
|
![]() |
| Outils de la discussion | |
|
|