summaryrefslogtreecommitdiffstats
path: root/lzgrep
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 07:23:45 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 07:23:45 +0000
commit2f1db1facab89cd2eda64441f9b730a3831f5746 (patch)
tree85afd6f51fae791905b39e7ec5e6d7aa6c79227d /lzgrep
parentAdding debian version 1.6~pre2-1. (diff)
downloadlzip-2f1db1facab89cd2eda64441f9b730a3831f5746.tar.xz
lzip-2f1db1facab89cd2eda64441f9b730a3831f5746.zip
Merging upstream version 1.6~pre3.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rwxr-xr-xlzgrep12
1 files changed, 6 insertions, 6 deletions
diff --git a/lzgrep b/lzgrep
index 0991f58..9cb2e49 100755
--- a/lzgrep
+++ b/lzgrep
@@ -44,7 +44,7 @@ while [ x"$1" != x ] ; do
echo "Lzip home page: http://www.nongnu.org/lzip/lzip.html"
exit 0 ;;
--version | --ve* | -V)
- echo "Lzgrep 0.4"
+ echo "Lzgrep 0.5"
echo "Copyright (C) 2009 Antonio Diaz Diaz."
echo "This script is free software: you have unlimited permission"
echo "to copy, distribute and modify it."
@@ -56,7 +56,7 @@ while [ x"$1" != x ] ; do
--lz*)
default_prog=lzip ;;
-[drRzZ] | --di* | --exc* | --inc* | --nu* | --rec*)
- echo "${invocation_name}: option $1 not supported\n"
+ echo "${invocation_name}: option $1 not supported"
exit 1 ;;
-e?* | -f?* | --file=* | --reg*=*)
args="${args} $1"; have_pat=1 ;;
@@ -116,15 +116,15 @@ for i in "$@" ; do
fi ;;
esac
if test ${list} -eq 1; then
- ${prog} -- "$i" | grep ${args} 2>&1 > /dev/null && echo $i
+ ${prog} -- "$i" | grep ${args} 2>&1 > /dev/null && echo "$i"
r=$?
elif test $# -eq 1 -o ${no_name} -eq 1; then
${prog} -- "$i" | grep ${args}
r=$?
else
- j=${i//\\/\\\\}
- j=${j//|/\\|}
- j=${j//&/\\&}
+ j=`printf "%s" "$i" | sed 's/\\\\/\\\\\\\\/g'`
+ j=`printf "%s" "$j" | sed 's/|/\\\\|/g'`
+ j=`printf "%s" "$j" | sed 's/&/\\\\&/g'`
j=`printf "%s" "$j" | tr '\n' ' '`
${prog} -- "$i" | grep ${args} | sed "s|^|${j}:|"
r=$?