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
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
- Random (24.10.2009 20:09)
- Matthias Tacke (24.10.2009 20:10)
- billious (24.10.2009 21:30)
- Todd Vargo (25.10.2009 12:41)
- Dr J R Stockton (26.10.2009 18:01)
- Todd Vargo (26.10.2009 22:52)
- Dr J R Stockton (27.10.2009 15:58)
