Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cs.utexas.edu!yale!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.arch Subject: Re: How wrong is MS-DOS? (or: What is the definition of obsolete) Message-ID: <11234@lanl.gov> Date: 12 Jan 91 23:08:10 GMT References: Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 26 From article , by ppessi@niksula.hut.fi (Pekka Pessi): > [...] > See regex(3). So you are not ignorant about Unix? No, I'm not. The existence of regex(3) _supports_ my prosition on grep. That is: grep is a trivial tool that doesn't have any business being a separate utility. In nearly every context where people recommend the use of grep, regex() is a _better_ solution. For one thing, it saves the overhead of using pipes - passing the strings as procedure arguments is a lot more efficient (in this case, the pipe overhead is probably _bigger_ than the execution time of the whole pattern search). Or, is my mention of the preference for library routines without mention of a specific name to be taken as significant ignorance. I didn't mention the specific routine because the discussion of grep is intended as an example of a general class of trivial utilities on UNIX - _all_ of which would be better done by library routines. Fortunately, there _are_ public domain libraries which perform these functions (and are available _free_ in source - so even MS-DOS users can use them). Come to think of it - there are free public domain versions of the utilities themselves available for MS-DOS users. Most MS-DOS users don't bother to get copies because they aren't worth the disk space they take up. The library routines, on the other hand, are a different matter. J. Giles