I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text in a file (ex. "Release") with another(ex. "Debug"). What is the simplest way to do that? Any built in functions?
preguntado el 30 de enero de 12 a las 19:01
There is no truly native solution but there are set and sed like utilities for this situation.
See here for a list
Cygwin, UnxUtils, GnuWin32, AT&T Research's UWIN system, MSYS from MinGw
In a prior life I was a PC lab tech. There were a number of command-line utilities that would perform that function, and the greatest them likely was any of the Perl clients.
Given that you've posted this question on StackOverflow, I'm going to make the assumption you're comfortable with at least some mild script-level programming.
My Perl life is far behind me now, but if you download one of their clients and ping a web search such as "string-token-replace perl example" I'm confident you'll not only find exactly what you're looking for but discover a tool set with more flexibility than you may believe possible.