From 2f1db1facab89cd2eda64441f9b730a3831f5746 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 08:23:45 +0100 Subject: Merging upstream version 1.6~pre3. Signed-off-by: Daniel Baumann --- lzgrep | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lzgrep') 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=$? -- cgit v1.2.3