I am using GNU Sed for Windows in a batch file. I want to use the sed grouping command {} to group a set of commands. But according to the documentation for the UNIX platform, we must start each sed command within the {} in a new line. The can be done in UNIX since bash supports spanning a command into >1 lines. But in a Windows batch file, how do we split a command into >1 lines? I know I can put all sed commands in a separate script file and invoke sed with '-f script-filename'. But I want to restrict to just 1 batch file and want to place everything inside the batch file by using the 'sed -e script' option.
How do we specify grouping command using sed -e inside a batch file?
EDIT
For example, from this http://www.grymoire.com/Unix/Sed.html#uh-35 :
#!/bin/sh
# This is a Bourne shell script that removes #-type comments
# between 'begin' and 'end' words.
sed -n '
/begin/,/end/ {
s/#.*//
s/[ ^I]*$//
/^$/ d
p
}
'
How do we do the same thing in a batch file? I mean when they port sed to windows platform, they should have encountered this issue and figured out a workaround for it. Unless, the GNU guys decided the {} is not supported in a batch file but I cant find anything in the GNU Sed documentation.