sql - Modify argument in batch script -


in nutshell need way convert batch file containing content -> sqlcmd -s rave -v payment late = %1 -i rave_params.sql -o alert.txt

-to-

a new batch file containing content -> sqlcmd -s rave -v "'your payment late'" = %1 -i rave_params.sql -o alert.txt

your question isn't clear me. want create new batch file based on content of old one? if so, i'd recommend using powershell transformation:

$srch = '-v\s*(.*?)\s*=\s*%1' $repl = "-v `"'`$1'`" = %1"  (get-content old.bat) -replace $srch, $repl | set-content new.bat 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -