[net.micro.mac] grep for mac.

arndt@ttds.UUCP (Arndt Jonasson) (06/15/85)

Some time ago I asked the net if anyone knew of any Mac programs
performing the functions of the Unix programs diff and grep. 

Result: The Aztec C includes grep and diff programs, which probably
means you have to buy the Aztec C system (which doesn't seem to be bad,
it was described in MacDeveloper, published on the net some time ago).

The Unix utility wc exists as a desk accessory. I have that one, but I
don't know where I got it.

Otherwise noone could give me a positive answer. So I wrote one myself.
My MacGrep has been posted to net.sources.mac. It was written in Consulair C,
and is rather simple. Only plain strings can be searched for, no regular
expressions. The files searched are all files on a volume with file type
TEXT, e.g. created by EDIT or MockWrite.
There are no fancy Mac-interface bells and whistles; part of the interaction
takes place in a TTY window.
To let you choose a volume, a standard get file dialog window is opened.
Choose the volume you want to search, and select the Open button. It doesn't
matter which file you have selected. All files are shown, not just the 
TEXT ones.

If I had time, I would include the possibility to search MacWrite files, 
MS Word files, search for general regular expressions, make the interface
more Mac-like, search files whose name match a certain pattern...

--

	Arndt Jonasson, ZYX Research, Stockholm
uucp:	{decvax, philabs}!mcvax!enea!ttds