home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
epmsmp.zip
/
GREP.E
< prev
next >
Wrap
Text File
|
1996-05-03
|
774b
|
25 lines
; Call an external GREP utility and display the results in an EPM file.
; The modified Alt+1 definition in ALT_1.E will let you place the
; cursor on a line in the results file and press Alt+1 to load the
; corresponding source 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)