Re: Probleming using gnu sed in windows batch script

"[email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
Just a little bit more information.

Microsofts command line syntax require the use of surrounding doublequotes for any sed command. This is also true when using batch files. Single quotes are not accepted and lead to the sed error output posted by Ben.
Furthermore any path or filename should be surrounded by doublequotes. Although this is not mandatory for file or pathnames that doesn't contain spaces, its a good and secure coding behaviour to do so.
If you refer to a file and try to redirect output to another file the correct and commonly used syntax is posted below.
the command "start" opens a new command line instance and provides additional options. I guess you don't want to use it here.

@echo on
start sed "s/\xc3\xbc/\xtc/g" "test.txt" > "testnew.txt"
:: this should also work - remove both colons to try
:: sed "s/\xc3\xbc/\xtc/g" "test.txt" > "testnew.txt"
pause

Zharif

[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.