Shellbefehl grep soll nur ersten Treffer ausgeben

Malte Gell <[email protected]>
Newsgroups gmane.linux.suse.programming
Message-ID <[email protected]>
Hallo,

mal ne Frage, Shell ist die Bash 3 aus openSUSE 10.3. Ich möchte, dass 
grep den jeweils ersten Treffer ausgibt und keine weiteren, nur wie...

Bsp.: die Datei FOO enthält die Werte foo1 foo2 und foo3

ein grep FOO ergibt im Ergebnis nun
foo1
foo2
foo3

Ich möchte, dass grep aber nur den ersten Treffer ausgibt, also foo1. 
Wenn ich die manpage richtig lese, gitb es da keinen eingebauten 
Schalter, der das könnte, oder?

danke
Gruß
Malte
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.