nntp2http.com
Posting
Suche
Optionen
Hilfe & Kontakt

YARN.bat - random number generator by cjm - how to make it work?

Von: Andreas Eibach (aeibach@mail.com) [Profil]
Datum: 24.10.2009 19:58
Message-ID: <7kgsg4F3akt5iU1@mid.uni-berlin.de>
Newsgroup: alt.msdos.batch.nt
Hi there,

I've scoured the archives for a random number generator that ...

- will not use the %random% variable, because this should work on ALL
windows (at least from 9x)
- does not use temp files

I've come across cjm's nice and quick effort from 5 years ago...

http://groups.google.com/group/alt.msdos.batch.nt/msg/228a2e5b1fb974a0?hl=en&dmode=sou
rce

-begin code-
For /f "tokens=1-7 delims=:/-, " %%i in ('echo exit^|cmd /q /k"prompt $D
$T"') do (
For /f "tokens=2-4 delims=/-,() skip=1" %%a in ('echo.^|date') do (
For /f "tokens=1-2 delims=." %%a in ('echo %%o') do (
echo %%b
)
)
)
-end code-

Frankly, I don't even EXPECT this to work because:

the echoed 'b' variable was never defined elsewhere
Nor was %%o.

Does anyone have an idea how to fix this so that it works?

TIA
Andreas


[ Auf dieses Posting antworten ]

Antworten