Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: grep replacement (first match only per file) Message-ID: <56347@sun.uucp> Date: 13 Jun 88 20:27:09 GMT References: <16148@brl-adm.ARPA> Sender: news@sun.uucp Lines: 18 > ? This works, and is indeed faster. However, it shares one problem with > ? all of the others: '*' expansion. As an (uncomfortable) example, > ? /usr/spool/news/talk/bizarre has over 2500 articles in it at our site, > ? and the shell can't expand that properly (SunOS 3.4, if it matters). "Fixed in 4.0", perhaps: from 4.0's "sys/param.h": #define NCARGS 0x100000 /* (absolute) max # characters in exec arglist */ (I don't know which versions of the shell can cope with 1MB argument lists, if any.) > Don't forget about xargs. Assuming, of course, that your system has it; SunOS has it in releases 3.2 or later (if you install the "System V Optional Software"; it's in "/usr/bin"), but vanilla 4.xBSD doesn't, for example. I would not be at all surprised to hear that there is some public-domain reimplementation out there somewhere.