projects
/
platform
/
upstream
/
xz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf38da0
)
Fix xzgrep to not break if filenames have spaces or quotes.
author
Lasse Collin
<lasse.collin@tukaani.org>
Sun, 7 Mar 2010 17:52:25 +0000
(19:52 +0200)
committer
Lasse Collin
<lasse.collin@tukaani.org>
Sun, 7 Mar 2010 17:52:25 +0000
(19:52 +0200)
Thanks to someone who reported the bug on IRC.
src/scripts/xzgrep.in
patch
|
blob
|
history
diff --git
a/src/scripts/xzgrep.in
b/src/scripts/xzgrep.in
index
9a9b393
..
bfa9fb5
100644
(file)
--- a/
src/scripts/xzgrep.in
+++ b/
src/scripts/xzgrep.in
@@
-154,7
+154,7
@@
for i; do
# Fail if xz or grep (or sed) fails.
xz_status=$(
exec 5>&1
- (
eval "$uncompress"
-- "$i" 5>&-; echo $? >&5) 3>&- |
+ (
$uncompress
-- "$i" 5>&-; echo $? >&5) 3>&- |
if test $files_with_matches -eq 1; then
eval "$grep" -q && { printf '%s\n' "$i" || exit 2; }
elif test $files_without_matches -eq 1; then