diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2022-07-18 21:52:31 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2022-07-18 22:06:10 +0300 |
commit | bd7b290f3fe4faeceb7d3497ed9bf2e6ed5e7dc5 (patch) | |
tree | 40e44c78d9b1f27a2a7c96e69d29097420f1c325 /src/xz/suffix.c | |
parent | xzgrep: Use -e to specify the pattern to grep. (diff) | |
download | xz-bd7b290f3fe4faeceb7d3497ed9bf2e6ed5e7dc5.tar.xz |
xzgrep: Use grep -H --label when available (GNU, *BSDs).
It avoids the use of sed for prefixing filenames to output lines.
Using sed for that is slower and prone to security bugs so now
the sed method is only used as a fallback.
This also fixes an actual bug: When grepping a binary file,
GNU grep nowadays prints its diagnostics to stderr instead of
stdout and thus the sed-method for prefixing the filename doesn't
work. So with this commit grepping binary files gives reasonable
output with GNU grep now.
This was inspired by zgrep but the implementation is different.
Diffstat (limited to 'src/xz/suffix.c')
0 files changed, 0 insertions, 0 deletions