Message3683
The attached test_empty.bat allows quoted and unquoted strings to be
tested for emptiness.
The output is as follows:
C:\stuff\temp>test_empty.bat
["my home 1"] was set: 1
command: ["my home 1\bin\java"]
[my home 2] was set: 1
command: ["my home 2\bin\java"]
[""] was set: 0
command: [java]
[] was set: 0
command: [java]
[] was set: 0
command: [java]
["myhome6"] was set: 1
command: ["myhome6\bin\java"]
[myhome7] was set: 1
command: ["myhome7\bin\java"]
Legend: 1 = the variable is set,
0 = it is not set
The key line is the for loop:
for /f "useback tokens=*" %%a in ('%_TRIMMED_VAR%') do set
_TRIMMED_VAR=%%~a
, which should be applicable to jython.bat as well. |
|
Date |
User |
Action |
Args |
2008-10-14 12:39:36 | otmarhumbel | set | messageid: <1223987976.45.0.633946563445.issue1125@psf.upfronthosting.co.za> |
2008-10-14 12:39:36 | otmarhumbel | set | recipients:
+ otmarhumbel, fwierzbicki, mr_tines, foripperz |
2008-10-14 12:39:36 | otmarhumbel | link | issue1125 messages |
2008-10-14 12:39:36 | otmarhumbel | create | |
|