home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
495a.lha
/
ISpell_v3.1ljr
/
rexx
/
lookup.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-04-06
|
869b
|
31 lines
/*
* lookup.rexx looks up a word using full regular expressions
* (Note for beginners: . matches any character, .* matches any string)
* using ISpell in ARexx server mode
* Requires ISpell version 3.1ljr with ARexx Server mode.
* Started: 12/27/90 LJR
* Copyright (C) 1990 Loren J. Rittle
* Use as you will, just document your changes and keep my copyright
* notice intact.
*/
parse arg item cmdline
options results
if item = "" then do
say "Usage: lookup word1 word2 ..."
exit
end
if pos('IRexxSpell',(show(ports))) = 0 then do
'runback ispell -r >null: <null:'
waitforport 'IRexxSpell'
end
address 'IRexxSpell' lookup item
r = result
r1 = substr(r,1,1)
select
when r1 = '&' then
say "The pattern '"||item||"' matches:" substr(r,3)
otherwise say "For the pattern '"||item||"' I got" r
end
if cmdline ~= "" then call lookup cmdline
exit