Re: [patch] -H flag for grep.

2011-03-03 Thread Ted Unangst
On Mon, Feb 21, 2011 at 2:29 PM, Ted Unangst ted.unan...@gmail.com wrote: On Mon, Feb 21, 2011 at 7:34 AM, Pascal Stumpf pascal.stu...@cubes.de wrote: Implement a -H flag for grep, useful for combining e.g. find and grep. Can anyone commit it? I think I can do so tonight, unless someone has

Re: [patch] -H flag for grep.

2011-02-22 Thread patrick keshishian
On Mon, Feb 21, 2011 at 10:00:21PM -0430, Andres Perera wrote: On Mon, Feb 21, 2011 at 7:01 PM, Philip Guenther guent...@gmail.com wrote: On Mon, Feb 21, 2011 at 2:30 PM, Fred Crowson open...@crowsons.net wrote: On 02/21/11 15:54, Alexander Schrijver wrote: ... grep(1) only prints the

Re: [patch] -H flag for grep.

2011-02-22 Thread Iruatã Souza
On Mon, Feb 21, 2011 at 11:30 PM, Andres Perera andre...@zoho.com wrote: On Mon, Feb 21, 2011 at 7:01 PM, Philip Guenther guent...@gmail.com wrote: On Mon, Feb 21, 2011 at 2:30 PM, Fred Crowson open...@crowsons.net wrote: On 02/21/11 15:54, Alexander Schrijver wrote: ... grep(1) only prints

Re: [patch] -H flag for grep.

2011-02-22 Thread Iruatã Souza
On Tue, Feb 22, 2011 at 6:08 AM, patrick keshishian sids...@boxsoft.com wrote: my that's awkward. if you can't combine unix tools, you should be looking at perl. iru

Re: [patch] -H flag for grep.

2011-02-22 Thread Pascal Stumpf
On Tue, Feb 22, 2011 at 12:52:24PM -0300, Iruatc Souza wrote: On Tue, Feb 22, 2011 at 6:08 AM, patrick keshishian sids...@boxsoft.com wrote: my that's awkward. if you can't combine unix tools, you should be looking at perl. iru I bet everyone here knows one can achieve the same

Re: [patch] -H flag for grep.

2011-02-22 Thread Pascal Stumpf
On Tue, Feb 22, 2011 at 04:13:34PM -0300, Iruatc Souza wrote: On Tue, Feb 22, 2011 at 2:21 PM, Pascal Stumpf pascal.stu...@cubes.de wrote: On Tue, Feb 22, 2011 at 12:52:24PM -0300, Iruatc Souza wrote: On Tue, Feb 22, 2011 at 6:08 AM, patrick keshishian sids...@boxsoft.com wrote: my

Re: [patch] -H flag for grep.

2011-02-22 Thread Pascal Stumpf
On Tue, Feb 22, 2011 at 02:29:59PM -0430, Andres Perera wrote: On Tue, Feb 22, 2011 at 12:51 PM, Pascal Stumpf pascal.stu...@cubes.de wrote: On Tue, Feb 22, 2011 at 12:52:24PM -0300, Iruatc Souza wrote: On Tue, Feb 22, 2011 at 6:08 AM, patrick keshishian sids...@boxsoft.com wrote: my

Re: [patch] -H flag for grep.

2011-02-22 Thread Andres Perera
On Tue, Feb 22, 2011 at 12:51 PM, Pascal Stumpf pascal.stu...@cubes.de wrote: On Tue, Feb 22, 2011 at 12:52:24PM -0300, Iruatc Souza wrote: On Tue, Feb 22, 2011 at 6:08 AM, patrick keshishian sids...@boxsoft.com wrote: my that's awkward. if you can't combine unix tools, you should be

Re: [patch] -H flag for grep.

2011-02-22 Thread Marco Peereboom
You made your point; no need repeating it. On Tue, Feb 22, 2011 at 08:26:31PM +0100, Pascal Stumpf wrote: On Tue, Feb 22, 2011 at 04:13:34PM -0300, Iruatc Souza wrote: On Tue, Feb 22, 2011 at 2:21 PM, Pascal Stumpf pascal.stu...@cubes.de wrote: On Tue, Feb 22, 2011 at 12:52:24PM -0300,

Re: [patch] -H flag for grep.

2011-02-22 Thread Iruatã Souza
On Tue, Feb 22, 2011 at 2:21 PM, Pascal Stumpf pascal.stu...@cubes.de wrote: On Tue, Feb 22, 2011 at 12:52:24PM -0300, Iruatc Souza wrote: On Tue, Feb 22, 2011 at 6:08 AM, patrick keshishian sids...@boxsoft.com wrote: my that's awkward. if you can't combine unix tools, you should be

Re: [patch] -H flag for grep.

2011-02-22 Thread Iruatã Souza
On Tue, Feb 22, 2011 at 2:21 PM, Pascal Stumpf pascal.stu...@cubes.de wrote: On Tue, Feb 22, 2011 at 12:52:24PM -0300, Iruatc Souza wrote: On Tue, Feb 22, 2011 at 6:08 AM, patrick keshishian sids...@boxsoft.com wrote: my that's awkward. if you can't combine unix tools, you should be

Re: [patch] -H flag for grep.

2011-02-22 Thread Iruatã Souza
On Tue, Feb 22, 2011 at 4:26 PM, Pascal Stumpf pascal.stu...@cubes.de wrote: On Tue, Feb 22, 2011 at 04:13:34PM -0300, Iruatc Souza wrote: On Tue, Feb 22, 2011 at 2:21 PM, Pascal Stumpf pascal.stu...@cubes.de wrote: On Tue, Feb 22, 2011 at 12:52:24PM -0300, Iruatc Souza wrote: On Tue, Feb

Re: [patch] -H flag for grep.

2011-02-22 Thread Stuart Henderson
On 2011/02/22 01:08, patrick keshishian wrote: find . -name '*.c' -exec awk '/bla/ {print FILENAME $0}' my that's awkward. ^^^ *groan*

Re: [patch] -H flag for grep.

2011-02-22 Thread patrick keshishian
On Tue, Feb 22, 2011 at 11:10 AM, Iruatc Souza iru.mu...@gmail.com wrote: On Tue, Feb 22, 2011 at 2:21 PM, Pascal Stumpf pascal.stu...@cubes.de wrote: On Tue, Feb 22, 2011 at 12:52:24PM -0300, Iruatc Souza wrote: On Tue, Feb 22, 2011 at 6:08 AM, patrick keshishian sids...@boxsoft.com wrote:

Re: [patch] -H flag for grep.

2011-02-22 Thread Nick Holland
On 02/22/11 16:47, Stuart Henderson wrote: On 2011/02/22 01:08, patrick keshishian wrote: find . -name '*.c' -exec awk '/bla/ {print FILENAME $0}' my that's awkward. ^^^ *groan* d'oh. I missed that. And I thought I was good at the bad pun. Nick.

Re: [patch] -H flag for grep.

2011-02-22 Thread Marco Peereboom
On Tue, Feb 22, 2011 at 08:41:07PM -0500, Nick Holland wrote: On 02/22/11 16:47, Stuart Henderson wrote: On 2011/02/22 01:08, patrick keshishian wrote: find . -name '*.c' -exec awk '/bla/ {print FILENAME $0}' my that's awkward. ^^^ *groan* d'oh. I missed that. And I

[patch] -H flag for grep.

2011-02-21 Thread Pascal Stumpf
Implement a -H flag for grep, useful for combining e.g. find and grep. Can anyone commit it? Index: grep.1 === RCS file: /cvs/src/usr.bin/grep/grep.1,v retrieving revision 1.39 diff -u -r1.39 grep.1 --- grep.1 3 Sep 2010

Re: [patch] -H flag for grep.

2011-02-21 Thread Pascal Stumpf
On Mon, Feb 21, 2011 at 01:38:41PM +0100, Bret Lambert wrote: find / -name my\*balls | xargs grep -e batman -e robocop Lol. I donbt have CVS access. ;)

Re: [patch] -H flag for grep.

2011-02-21 Thread Bret Lambert
find / -name my\*balls | xargs grep -e batman -e robocop On Mon, Feb 21, 2011 at 1:34 PM, Pascal Stumpf pascal.stu...@cubes.de wrote: Implement a -H flag for grep, useful for combining e.g. find and grep. Can anyone commit it? Index: grep.1

Re: [patch] -H flag for grep.

2011-02-21 Thread Alexander Schrijver
On Mon, Feb 21, 2011 at 01:34:51PM +0100, Pascal Stumpf wrote: Implement a -H flag for grep, useful for combining e.g. find and grep. -o used to do this but has been removed. (See the commit logs for the reason, i forgot it) grep(1) only prints the filename when it receives more then 1 filename

Re: [patch] -H flag for grep.

2011-02-21 Thread Paul de Weerd
On Mon, Feb 21, 2011 at 04:54:40PM +0100, Alexander Schrijver wrote: | On Mon, Feb 21, 2011 at 01:34:51PM +0100, Pascal Stumpf wrote: | Implement a -H flag for grep, useful for combining e.g. find and grep. | | -o used to do this but has been removed. (See the commit logs for the reason, i |

Re: [patch] -H flag for grep.

2011-02-21 Thread Pascal Stumpf
On Mon, Feb 21, 2011 at 04:54:40PM +0100, Alexander Schrijver wrote: On Mon, Feb 21, 2011 at 01:34:51PM +0100, Pascal Stumpf wrote: Implement a -H flag for grep, useful for combining e.g. find and grep. -o used to do this but has been removed. (See the commit logs for the reason, i forgot

Re: [patch] -H flag for grep.

2011-02-21 Thread Dan Harnett
On Mon, Feb 21, 2011 at 04:54:40PM +0100, Alexander Schrijver wrote: On Mon, Feb 21, 2011 at 01:34:51PM +0100, Pascal Stumpf wrote: grep(1) only prints the filename when it receives more then 1 filename as arguments. Thus, when you do this: $ find . -name '*.c' -exec grep bla {} \; It

Re: [patch] -H flag for grep.

2011-02-21 Thread Mark Kettenis
Date: Mon, 21 Feb 2011 14:29:37 -0500 From: Ted Unangst ted.unan...@gmail.com On Mon, Feb 21, 2011 at 7:34 AM, Pascal Stumpf pascal.stu...@cubes.de wrote: Implement a -H flag for grep, useful for combining e.g. find and grep. Can anyone commit it? I think I can do so tonight, unless

Re: [patch] -H flag for grep.

2011-02-21 Thread Pascal Stumpf
On Mon, Feb 21, 2011 at 04:20:24PM -0500, Ted Unangst wrote: On Mon, Feb 21, 2011 at 3:46 PM, Mark Kettenis mark.kette...@xs4all.nl wrote: Also, -H is non-standard AFIK, and we try to avoid adding non-standard options to our tools. Theo has objected to changes like this before. So I

Re: [patch] -H flag for grep.

2011-02-21 Thread Fred Crowson
On 02/21/11 15:54, Alexander Schrijver wrote: On Mon, Feb 21, 2011 at 01:34:51PM +0100, Pascal Stumpf wrote: Implement a -H flag for grep, useful for combining e.g. find and grep. -o used to do this but has been removed. (See the commit logs for the reason, i forgot it) grep(1) only prints

Re: [patch] -H flag for grep.

2011-02-21 Thread Ted Unangst
On Mon, Feb 21, 2011 at 3:46 PM, Mark Kettenis mark.kette...@xs4all.nl wrote: Also, -H is non-standard AFIK, and we try to avoid adding non-standard options to our tools. Theo has objected to changes like this before. So I don't think this should go in without giving him a chance to comment.

Re: [patch] -H flag for grep.

2011-02-21 Thread Philip Guenther
On Mon, Feb 21, 2011 at 2:30 PM, Fred Crowson open...@crowsons.net wrote: On 02/21/11 15:54, Alexander Schrijver wrote: ... grep(1) only prints the filename when it receives more then 1 filename as arguments. Thus, when you do this: $ find . -name '*.c' -exec grep bla {} \; It doesn't print

Re: [patch] -H flag for grep.

2011-02-21 Thread Andres Perera
On Mon, Feb 21, 2011 at 7:01 PM, Philip Guenther guent...@gmail.com wrote: On Mon, Feb 21, 2011 at 2:30 PM, Fred Crowson open...@crowsons.net wrote: On 02/21/11 15:54, Alexander Schrijver wrote: ... grep(1) only prints the filename when it receives more then 1 filename as arguments. Thus,