By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!@Echo Off
SetLocal
UnsetArray /Q EnvVars
SetArray EnvVars[64]
Echo >NUL: %@ExecArray[EnvVars,Set]
Set I=0
Do While %I LT %_ExecArray
If %@Len[%@Left[%@Index[%EnvVars[%I],=],%EnvVars[%I]]] == %@If["%1" == "", 2,%1] ^
@Echo %EnvVars[%I]
Set /A I+=1
EndDo
UnsetArray /Q EnvVars
EndLocal
Quit 0
set | grep "^.[^=]="
It is documented that when SET is used to display currently defined environment variables, the only wildcard available is * - but why?
I no longer use "tools" like "grep" and the like....
Yeah! Why does it do that? Stopping after the first match is supposed to be an option (/F).Well, I was hoping to do it with FFIND. But it appears that FFIND always quits at the first match. (Is there any way to override that?)
e:\logs\mercury> set | ffind /e"^..=" /k /m
AE=3
e:\logs\mercury> set | do line in @CON ( if %@regex["^..=",%line] == 1 echo %line )
AE=3
AF=2
AL=3
(snip)
set | ffind /e"^.[^=]=" /v /k /m
Yeah! Why does FFIND do that? Stopping after the first match is supposed to be an option (/F).
e:\logs\mercury> ffind /e"." /m /k MERCURYS.LOG
T 20100601 033308 4bb58e47 Connection from 74.71.55.217
Hah!
Code:set | ffind /e"^.[^=]=" /v /k /m