[comp.sys.mac.programmer] Grep for MPW

phil@mit-amt.MEDIA.MIT.EDU (Phil Sohn) (05/23/88)

Does anyone have a mutliple file search program for
MPW (i.e. Unix grep)?  Please send responses via 
email to me.

			Phil Sohn

Internet: phil@ems.media.mit.edu (18.85.0.6)

han@Apple.COM (Byron Han, Licensed To Dream) (05/24/88)

In article <2511@mit-amt.MEDIA.MIT.EDU> phil@mit-amt.MEDIA.MIT.EDU (Phil Sohn) writes:
>
>Does anyone have a mutliple file search program for
>MPW (i.e. Unix grep)?  

Try "search"

Search [-s | -i] [-r] [-q] [-f file] pattern [file]  < file > found
    -f file            # lines not written to output are put in this file
    -i                 # case insensitive search (overriding {CaseSensitive})
    -s                 # case sensitive search (overriding {CaseSensitive})
    -r                 # write non-matching line to standard output
    -q                 # suppress file name and line number in output

In "{MPW}UserStartup" I added the lines

alias	grep 	search
export	grep
-----
-- 
Byron Han,  Licensed to Dream.             Macintosh - One Small Step For Apple.
Apple Computer, Inc. MS 27Y                ----One Giant Leap for Humankind.----
ATTnet:408-973-6450     applelink:HAN1     domain:han@apple.COM       MacNET:HAN
GENIE:BYRONHAN    COMPUSERVE:72167,1664    UUCP:{sun,voder,nsc,decwrl}!apple!han

dorourke@polyslo.UUCP (David O'Rourke) (05/24/88)

In article <2511@mit-amt.MEDIA.MIT.EDU> phil@mit-amt.MEDIA.MIT.EDU (Phil Sohn) writes:
>
>Does anyone have a mutliple file search program for
>MPW (i.e. Unix grep)?  Please send responses via 
>email to me.

  I didn't send this email because I requires the assistance of the net.
Isn't the MPW search command {not the Search menu} but the command itself 
similar to Unix Grep, and if it isn't it seems to me that a shell script 
could handle the job quite nicely.

  Thanks for any help.

-- 
David M. O'Rourke

Disclaimer: I don't represent the school.  All opinions are mine!

drc@dbase.UUCP (Dennis Cohen) (05/24/88)

In article <2511@mit-amt.MEDIA.MIT.EDU>, phil@mit-amt.MEDIA.MIT.EDU (Phil Sohn) writes:
> 
> Does anyone have a mutliple file search program for
> MPW (i.e. Unix grep)?  Please send responses via 
> email to me.

Excuse me, but I thought that was what the search tool did.  I even run with
it aliased as grep.  It does what I expect grep to do and does it quite well.

Am I missing something here?

Dennis Cohen
Ashton-Tate Macintosh Division
dBASE Mac Development Team
--------------------------
Disclaimer:  Opinions expressed above are _mine_!

dan@Apple.COM (Dan Allen) (05/27/88)

Yes, there is a grep-like utility for MPW, and it is included with every
copy of MPW sold.  It is called search.

Dan Allen
Software Explorer
Apple Computer

davidr@searchtech.com (David Resnick) (05/02/91)

Thanks to everyone for your input!  Steve Dorner
<uupsi!pequod.cso.uiuc.edu!dorner> directed us to the Search tool
in MPW, which somehow we had overlooked in reading the MPW manuals.
If we come across (or write ourselves) one that more exactly
emulates the UNIX version (with similar special symbols having
similar meanings) we'll let everyone know.  For the time being
however we'll content ourselves with this Search tool, which has
all the capabilities of grep with just the language changed.


-- 
David E. Resnick                                davidr@srchtec.uucp (registered)
search technology, inc.				           davidr@searchtech.com
4725 peachtree corners cir., suite 200		   {uupsi,stiatl}!srchtec!davidr
norcross, georgia 30092				                  (404) 441-1457