home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
wps
/
editor
/
epmtools
/
epmsmp
/
grep.e
< prev
next >
Wrap
Text File
|
1992-08-26
|
609b
|
22 lines
; Call an external GREP utility and display the results in an EPM file.
; by Larry Margolis
defc scan, grep =
sayerror 'Scanning files...'
call redirect('grep','/y /q /l' arg(1))
if .last=0 then
'q'
sayerror 'No hits.'
endif
defproc redirect(cmd)
universal vTEMP_PATH
outfile=vTEMP_PATH || substr(cmd'_______',1,8) || '.out'
quietshell cmd arg(2) '>'outfile '2>&1'
if RC = sayerror('Insufficient memory') or
RC = sayerror('File Not found') then stop; endif
'e' outfile
.filename='.Output from' cmd arg(2)
call erasetemp(outfile)