Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT]: grep -Z not working ???
Date: Tue, 19 Jul 2011 09:52:29
Message-Id: 20110719105058.559eebbd@zaphod.digimed.co.uk
In Reply to: [gentoo-user] [OT]: grep -Z not working ??? by meino.cramer@gmx.de
1 On Tue, 19 Jul 2011 05:12:53 +0200, meino.cramer@×××.de wrote:
2
3 > So when doing
4 >
5 > find /tmp | grep -Z tmp | xargs -0 md5sum
6 >
7 > it should work comparable to
8 >
9 > find /tmp -print0 | xargs -0 md5sum
10 >
11 > but for me it does not.
12
13 The man page specifically refers to the newline after a filename, you are
14 reading from stdin here so there is no filename. It only makes sense when
15 used with the -l option, as in the man page example.
16
17 grep -rlZ bar /foo
18
19 should give all the files in /foo that contain bar, terminated by NULs.
20
21
22 --
23 Neil Bothwick
24
25 You know the end of the world is near when the Spice Girls start
26 reproducing.

Attachments

File name MIME type
signature.asc application/pgp-signature