sed and quoting issue



Hello,

I'd like to execute it:
sed -e "s#\(^\.INCLUDE[ \t]*\"\).*\(noMisMatch\)#\1$MODEL_DIR\2#g"
totoFile > titiFile

The problem is coming from \" which generate an error.
The first pattern i would like to catch is: .INCLUDE " which is in
regexp \(^\.INCLUDE[ \t]*\"\), but " is generated problem with sed
if i use single quote like this
sed -e 's#\(^\.INCLUDE[ \t]*\"\).*\(noMisMatch\)#\1${MODEL_DIR}\2#g'
totoFile > titiFile
I do not have problem to catch " but the $MODEL_DIR is not substitute
by the righ value.

can yoiu help me.

regards,

fabrice
.



Relevant Pages

  • Re: sed and quoting issue
    ... I'd like to execute it: ... totoFile> titiFile ... if i use single quote like this ...
    (comp.unix.shell)
  • Re: sed and quoting issue
    ... totoFile> titiFile ... your sed command. ... I'd prefer to exut this sed in CSH, as it is in a csh script and ...
    (comp.unix.shell)
  • Re: sed and quoting issue
    ... I'd like to execute it: ... totoFile> titiFile ... if i use single quote like this ...
    (comp.unix.shell)
  • Re: sed and quoting issue
    ... totoFile> titiFile ... Copy/paste what you get when you execute the script. ... if i use single quote like this ...
    (comp.unix.shell)