In fact, you probably want *only* the name of the file, for which you can use grep -l ...
Moshe * Jan Wilson <[EMAIL PROTECTED]> [020701 18:49]: > * Damian G <[EMAIL PROTECTED]> [020701 08:46]: > > the command looks like this: > > > > grep -i -A 2 ~/CDs/* -e searchterm > > > > will look inside of every file in ~/CDs/ directory, the " -i " switch > > means 'ignore the difference between upper and lowercase' so it can > > find "Gaim" when i search for "gaim" , then > > "-A 2" means i want it to show me two lines After the matching line. > > and " -e searchterm" is... well, the search term. > > You might try the -H option to grep. It produces output like this, > which might be a cleaner output: > > $ grep -H 'Senator' *.qif > cash.qif:PSenator Inn > cp91.qif:PThe Senator Inn & Conf Ctr > cp92.qif:PSenator Inn & Conference Center > cp.qif:PThe Senator Inn & Conf Ctr > cp.qif:PSenator Inn > cp.qif:ASenator Inn & Conference Cente > > > -- > Jan Wilson, SysAdmin _/*]; [EMAIL PROTECTED] > Corozal Junior College | |:' corozal.com corozal.bz > Corozal Town, Belize | /' chetumal.com & linux.bz > Reg. Linux user #151611 |_/ Network, SQL, Perl, HTML > > > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com