Hi, the manual page of grep mentioned the following:
-Z, --null Output a zero byte (the ASCII NUL character) instead of the character that normally follows a file name. For example, grep -lZ outputs a zero byte after each file name instead of the usual newline. This option makes the output unambiguous, even in the presence of file names containing unusual characters like newlines. This option can be used with commands like find -print0, perl -0, sort -z, and xargs -0 to process arbitrary file names, even those that contain newline characters. for me (as a non-native English speak ;) ) this means: Replace a newlie after a filename with a zero-byte. So when doing find /tmp | grep -Z tmp | xargs -0 md5sum it should work comparable to find /tmp -print0 | xargs -0 md5sum but for me it does not. If my logic is not complete nonsense I dont understand the second part of the text of the manual page: This option can be used with commands like find -print0, perl -0, sort -z, and xargs -0 to process arbitrary file names, even those that contain newline characters. If I would do find /tmp -print0 | grep -Z tmp | xargs -0 md5sum there are no newlines which could be printed "instead of the character that normally follows a file name. For example, grep -lZ outputs a zero byte after each file name instead of the usual newline. ".... At this point confusion fills my head and nonsense follows my commands on the command line. What does that all mean? Thank you very much for any help and de-confusion in advance! :) Best regards, mcc