Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!cfa!igp From: igp@camcon.co.uk (Ian Phillipps) Newsgroups: comp.software-eng Subject: grep vs. SEARCH (Was Re: Software Development Tools) Keywords: VMS UNIX tools grep Message-ID: <1525@cfa.cfa.harvard.EDU> Date: 20 Apr 89 21:58:09 GMT References: <401@bionov.UUCP> <425a7504.138a5@hw-allen.UUCP> <328@uncw.UUCP> <1908@edison.GE.COM> <345@uncw.UUCP> Sender: news@cfa.harvard.EDU Organization: Cambridge Consultants Ltd., Cambridge, UK Lines: 22 session@uncw.UUCP (Zack Sessions) writes: >I am very familiar with SEARCH, and have read the manual page on grep >in preparation of porting it to OS9. I didn't see anything in grep that >SEARCH couldn't do. Did I miss something? Well, there are these quite useful things called regular expressions. How do you tell SEARCH to search for the equivalent of egrep '^[a-z0-9_]([a-z_0-9]*[ ])*([a-z_0-9]+)[ ]*\([a-z_0-9 ,]*\)[ ]*{?[ ]*(\/\*.*)?$' "$@" which locates (sanely laid out) C procedure definitions? (The r.e.s in grep would be a little different, but I had the egrep version to hand) (Sorry if the mailer garbles this - the spaces in the square brackets really mean "any whitespace" which vanilla [ef]+grep doesn't support directly.) -- UUCP: igp@camcon.co.uk | Cambridge Consultants Ltd | Ian Phillipps or: igp@camcon.uucp | Science Park, Milton Road |----------------- Phone: +44 223 420024 | Cambridge CB4 4DW, England |