Path: utzoo!attcan!uunet!cs.utexas.edu!csd4.milw.wisc.edu!srcsip!nic.MR.NET!shamash!com50!mscunx!hawkmoon!det From: det@hawkmoon.MN.ORG (Derek E. Terveer) Newsgroups: alt.sources Subject: Re: cgname - collect file names from {e,f,}grep output Keywords: egrep fgrep grep Message-ID: <1010@hawkmoon.MN.ORG> Date: 28 Jun 89 06:35:58 GMT References: <130@tridom.uucp> Organization: One of the Eternal Champions - Richfield, MN, 554232523, USA Lines: 18 In article <130@tridom.uucp>, wht@tridom.uucp (Warren Tucker) writes: > I wrote it to help me build a list of filenames to edit containing a certain > string: > fgrep BLAH *.[ch] | cgname /tmp/123 > vi `cat /tmp/123` I don't suppose that either the ksh or sh constructs that follow would be suitable replacements for this? ksh$ vi $(grep -l BLAH *.[ch]) sh$ vi `grep -l BLAH *.[ch]` -- Derek Terveer det@hawkmoon.MN.ORG || ..!uunet!rosevax!elric!hawkmoon!det w(612)681-6986 h(612)688-0667 "A proper king is crowned" -- Thomas B. Costain