coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cat with -H option like grep


From: Laurent Lyaudet
Subject: cat with -H option like grep
Date: Thu, 19 Mar 2026 16:24:28 +0100

Hello,

In some Bash scripts,
I make a call to "find" and then want to have all the lines of the
corresponding files,
prefixed with the corresponding file.
I created a hack with an always false regexp:
find ... | xargs grep -HP -v 'a(?!a)a'
A simpler solution would be:
find ... | xargs cat -H
But maybe you have something even better to propose.

Best regards,
     Laurent Lyaudet



reply via email to

[Prev in Thread] Current Thread [Next in Thread]