[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep: print one match switch
From: |
Dan Jacobson |
Subject: |
grep: print one match switch |
Date: |
20 Oct 2001 09:22:04 +0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
If grep has these features
-L, --files-without-match
Suppress normal output; instead print the name of
each input file from which no output would normally
have been printed. The scanning will stop on the
first match.
-l, --files-with-matches
Suppress normal output; instead print the name of
each input file from which output would normally
have been printed. The scanning will stop on the
first match.
Then how could it be that it lacks a switch to just print one match,
equivalent to awk '/pattern/{print;exit}'.
--
http://www.geocities.com/jidanni Tel+886-4-25854780
- grep: print one match switch,
Dan Jacobson <=