summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zgrep.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/zgrep.in b/zgrep.in
index e1d2229..361fe0e 100644
--- a/zgrep.in
+++ b/zgrep.in
@@ -235,7 +235,8 @@ do
(*'
'* | *'&'* | *'\'* | *'|'*)
icolon=$(printf '%s\n' "$i:" |
- LC_ALL=C sed -e 's/[&\|]/\\&/g' -e '$!s/$/\\/');;
+ LC_ALL=C sed -e 's/[&\|]/\\&/g' -e '$!s/$/\\/') ||
+ icolon='(unknown filename):';;
(*) icolon="$i:";;
esac
sed_script="s|^|$icolon|"