home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
KERNREV.ZIP
/
KERNREV.CMD
Wrap
OS/2 REXX Batch file
|
1992-07-08
|
1KB
|
23 lines
/* REXX */
/* I don't know of any documented way to determine the revision no. */
/* of a kernel- file under OS/2. But every kernel I've seen so far */
/* contains a string that identifies the kernel-revision. So I've written */
/* a small REXX script to do the work - just make sure the relevant kernel */
/* is in the root of the current drive. If you want to determine the */
/* revision of another kernel-file, just change the variable "kernel" */
/* (e.g. "A:\OS2KRNLI" or "C:\OS2KRNL.OLD" etc.): */
kernel = "\OS2KRNL"
if (stream(kernel, "command", "open read") == "READY:") then do
string = charin(kernel, , chars(kernel))
start = pos("Internal revision", string)
say substr(string, start, pos(x2c("00"), string, start) - start)
result = stream(kernel, "command", "close")
end
else
say "Can't find/open" kernel
exit
/* Origin: Thomas Weitzel - Darmstadt Area, Germany (2:2405/4.2) */