home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
disk
/
directory
/
rushdemo
/
scripts
/
diff.rexx
next >
Wrap
OS/2 REXX Batch file
|
1995-02-27
|
706b
|
40 lines
/*
** $VER: diff.rexx 37.1 (6.6.93)
**
** Diff source file and dest file of the same name.
**
** Written by Douglas Keller
*/
options results
address command
parse arg srcfile destdir .
if file == "" then do
say "Usage: diff <filename> <dest directory>"
exit 10
end
/* rush sends filenames quoted so strip spaces and quotes */
srcfile= strip(srcfile,b,'"')
pos=lastpos(":",srcfile)
if pos == 0 then do
pos=lastpos("/",srcfile)
end
pos = pos + 1
fileonly= substr(srcfile,pos)
if destdir == "" || right(destdir, 1) == ":" then
destfile= destdir || fileonly
else
destfile= destdir || '/' || fileonly
cmdline = 'diff "' || srcfile || '" "' || destfile || '"'
address command cmdline
exit rc