Hi Jerry et al... Thanks, this was dead on what I needed, JIM On Wednesday 27 April 2005 19:03, Jerry Feldman wrote:
On Wednesday 27 April 2005 11:46 am, James Hatridge wrote:
Hi all...
I have a file that I want to use this command on:
grep "USD" >> US.txt
The file has USD twice in it. How do I tell grep to stop after the first find?
Use the -m (or --mcount) command line option: grep -m 1 USD * >> US.txt -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
-- Jim Hatridge Linux User #88484 ------------------------------------------------------ WartHog Bulletin Info about new German Stamps http://www.fuzzybunnymilitia.org/~hatridge/bulletin/index.php Viel Feind -- Viel Ehr' Anti-US Propaganda stamp collection http://www.fuzzybunnymilitia.org/~hatridge/collection/index.php