Re: [SLE] grep question ...
From: Jerry Feldman (gaf_at_blu.org)
Date: 04/27/05
- Previous message: Luca: "Re: [SLE] SUSEplugger crashing/hanging in 9.3"
- In reply to: James Hatridge: "[SLE] grep question ..."
- Next in thread: James Hatridge: "[SLE] Re: grep question ..."
- Reply: James Hatridge: "[SLE] Re: grep question ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: suse-linux-e@suse.com Date: Wed, 27 Apr 2005 13:03:16 -0400
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 -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
- Previous message: Luca: "Re: [SLE] SUSEplugger crashing/hanging in 9.3"
- In reply to: James Hatridge: "[SLE] grep question ..."
- Next in thread: James Hatridge: "[SLE] Re: grep question ..."
- Reply: James Hatridge: "[SLE] Re: grep question ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|