sed in windows does not parse curly braces

Hi everyone:

I'm stuck at this point, could you guys please give me some hints about what I am doing wrong in the following script, I'm using sed for windows:

sed ^"$ {^
a^
STRINGTABLE  DISCARDABLE^
BEGIN^
  #define CLIENT_MODULE,  "%CLIENT_MODULE%"^
  #define CLIENT_ID, "%CLIENT_ID%"^
END^
}^" "%1\%2.rc"
 file_to_parse.rc

When trying to run it I get the following error:

sed: -e expression #1, char 0: unmatched `{'

thanks in advance

try like this :wink:

sed $^
"a^
{^
STRINGTABLE  DISCARDABLE^
BEGIN^
  #define CLIENT_MODULE,  "%CLIENT_MODULE%"^
  #define CLIENT_ID, "%CLIENT_ID%"^
END^
}^ "%1\%2.rc" " file_to_parse.rc

regards
ygemici

1 Like