* [gentoo-user] [OT] search for a string in a list of files but.....
@ 2006-02-27 14:01 Marco Calviani
2006-02-27 14:09 ` Boris Fersing
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Marco Calviani @ 2006-02-27 14:01 UTC (permalink / raw
To: gentoo-user
Hi list,
i need to search for a particular string inside a list of text
files: i've thought of this very simple one:
cat *.C | grep GetChi
it works but however if the string is found it does not say in which
of the file it has been found.....
Is there a simple way to do it?
Thanks in advance,
MC
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] [OT] search for a string in a list of files but.....
2006-02-27 14:01 [gentoo-user] [OT] search for a string in a list of files but Marco Calviani
@ 2006-02-27 14:09 ` Boris Fersing
2006-02-27 14:16 ` Marco Calviani
2006-02-27 14:13 ` Christian Heim
2006-02-27 15:11 ` Alexander Skwar
2 siblings, 1 reply; 5+ messages in thread
From: Boris Fersing @ 2006-02-27 14:09 UTC (permalink / raw
To: gentoo-user
2006/2/27, Marco Calviani <marco.calviani@gmail.com>:
> Hi list,
> i need to search for a particular string inside a list of text
> files: i've thought of this very simple one:
>
> cat *.C | grep GetChi
>
> it works but however if the string is found it does not say in which
> of the file it has been found.....
>
> Is there a simple way to do it?
>
> Thanks in advance,
> MC
>
hi,
try grep GetChi *.C
HTH.
Boris.
> --
> gentoo-user@gentoo.org mailing list
>
>
>
--
Quiconque me parle de Dieu en veut à ma bourse ou à ma liberté.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] [OT] search for a string in a list of files but.....
2006-02-27 14:01 [gentoo-user] [OT] search for a string in a list of files but Marco Calviani
2006-02-27 14:09 ` Boris Fersing
@ 2006-02-27 14:13 ` Christian Heim
2006-02-27 15:11 ` Alexander Skwar
2 siblings, 0 replies; 5+ messages in thread
From: Christian Heim @ 2006-02-27 14:13 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]
On Monday 27 February 2006 15:01, MC wrote:
> Hi list,
> i need to search for a particular string inside a list of text
> files: i've thought of this very simple one:
>
> cat *.C | grep GetChi
>
> it works but however if the string is found it does not say in which
> of the file it has been found.....
try this one:
grep -H GetChi *.C
--
Christian Heim <phreak@gentoo.org>
Gentoo Linux Developer - vserver
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] [OT] search for a string in a list of files but.....
2006-02-27 14:09 ` Boris Fersing
@ 2006-02-27 14:16 ` Marco Calviani
0 siblings, 0 replies; 5+ messages in thread
From: Marco Calviani @ 2006-02-27 14:16 UTC (permalink / raw
To: gentoo-user
Hi Boris,
> try grep GetChi *.C
poor me, this was very easy. It was my fault because man grep says it all.
Many thanks for your help Boris,
MC
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] [OT] search for a string in a list of files but.....
2006-02-27 14:01 [gentoo-user] [OT] search for a string in a list of files but Marco Calviani
2006-02-27 14:09 ` Boris Fersing
2006-02-27 14:13 ` Christian Heim
@ 2006-02-27 15:11 ` Alexander Skwar
2 siblings, 0 replies; 5+ messages in thread
From: Alexander Skwar @ 2006-02-27 15:11 UTC (permalink / raw
To: gentoo-user
Marco Calviani wrote:
> Hi list,
> i need to search for a particular string inside a list of text
> files: i've thought of this very simple one:
>
> cat *.C | grep GetChi
>
> it works but however if the string is found it does not say in which
> of the file it has been found.....
>
> Is there a simple way to do it?
grep GetChi *.C
Alexander Skwar
--
Doubt isn't the opposite of faith; it is an element of faith.
-- Paul Tillich, German theologian.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-02-27 15:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-27 14:01 [gentoo-user] [OT] search for a string in a list of files but Marco Calviani
2006-02-27 14:09 ` Boris Fersing
2006-02-27 14:16 ` Marco Calviani
2006-02-27 14:13 ` Christian Heim
2006-02-27 15:11 ` Alexander Skwar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox