Re: How to only find the first hit then return?

2011-08-25 Thread Eric Blake
On 08/25/2011 06:46 PM, Peng Yu wrote: Hi, By default, find will look for all the matches. Is there a way to let find only get the first match and then return? find ... -print -quit does your normal ... find, prints the first answer, then quits. -- Eric Blake ebl...@redhat.com+1-801-34

How to only find the first hit then return?

2011-08-25 Thread Peng Yu
Hi, By default, find will look for all the matches. Is there a way to let find only get the first match and then return? -- Regards, Peng

[bug #34083] [feature request] analog of -I REPLACE-STR without -l 1 restriction

2011-08-25 Thread gregory
Follow-up Comment #3, bug #34083 (project findutils): Just checked that such an option is not specified in POSIX (2004 or 2008) so scripts trying to be portable should not use it anyway and use the sh -c trick, for example. This is an argument for not implementing it and closing the report. _