Gentoo Archives: gentoo-user

From: Christian Heim <phreak@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] search for a string in a list of files but.....
Date: Mon, 27 Feb 2006 14:20:50
Message-Id: 200602271513.09058.phreak@gentoo.org
In Reply to: [gentoo-user] [OT] search for a string in a list of files but..... by Marco Calviani
1 On Monday 27 February 2006 15:01, MC wrote:
2 > Hi list,
3 > i need to search for a particular string inside a list of text
4 > files: i've thought of this very simple one:
5 >
6 > cat *.C | grep GetChi
7 >
8 > it works but however if the string is found it does not say in which
9 > of the file it has been found.....
10
11 try this one:
12 grep -H GetChi *.C
13
14 --
15 Christian Heim <phreak@g.o>
16 Gentoo Linux Developer - vserver