#102638 - 2003-07-09 12:46 AM
Re: Shell and quotes
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
quote: richard, how come you say it's mess?
I was referring to CMD in general rather than Howards solution.
It takes a special kind of talent to take a process which is already flawed, ambiguous and inconsistant and rather than fix it fiddle with it and make it far worse. MS really do have some talented individuals.
I mean, what in the name of the wee man is this about: quote: /V:ON Enable delayed environment variable expansion using ! as the delimiter. For example, /V:ON would allow !var! to expand the variable var at execution time. The var syntax expands variables at input time, which is quite a different thing when inside of a FOR loop.
I know NT+ are GUI operating systems, but is there really any need to obfuscate command line usage to the extent that variable expansion only works on Tuesday mornings when the operator is oriented 27.4 degrees east of magnetic North wearing a spangly thong and has had smoked haddock for breakfast.
quote: and didn't it have also limitation? something that it's only working on NT-based systems?
Yup. You'd think they'd pick something that works and stick with it.
Having a character which acts as an "escape" or "cancel" for following characters is a very simple thing to code and understand. What's more, it works in every situation. [ 08. July 2003, 13:08: Message edited by: Richard H. ]
|
|
Top
|
|
|
|
#102639 - 2003-07-08 02:34 PM
Re: Shell and quotes
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I think the (^) escape solution (not tested/verified by me and used extensively in my Perl programs (Perl escape: "\")) is a potential solution here but that might require one to add many extra characters to escape each of the quote characters where simply wrapping the entire command line in an extra pair of quotes is only two characters at a fairly well know places.
|
|
Top
|
|
|
|
#102640 - 2003-07-08 11:31 PM
Re: Shell and quotes
|
kholm
Korg Regular
   
Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
|
Thanks for your efforts guys and gals
I DO have to use the switch: /C in the shell-command because i want to use Start /Wait And Start is an internal command.
I want my scripts to pause until a program is installed!
I am working on a different solution, where i have the script wait until a process is started and then stopped.
This can be done via the COM-interface: winmgmt
But if the first program spawns anthother proces that lasts longer this won't work.
It's quite fun to observe that in years, it has been stated that DOS is dead. Never the less the possibilitys gets expanded and are NOT backword compatible.
Only other difference is that DOS is now called a console
-Erik
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 476 anonymous users online.
|
|
|