Package: gzip Version: 1.3.5-10 Tags: patch $ zgrep foo bar /bin/zgrep: 103: Syntax error: Bad substitution
This is with dash, which doesn't support ${foo//a/b} syntax. The following patch was tested with bash, ksh, ksh93, dash, posh. Peter --- zgrep~ 2005-05-21 00:01:45.000000000 -0500 +++ zgrep 2005-06-15 14:56:44.000000000 -0500 @@ -100,9 +100,7 @@ elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename -eq 1; }; then $grep $opt "$pat" else - i=${i//\\/\\\\} - i=${i//|/\\|} - i=${i//&/\\&} + i=$(echo "$i" | sed -e 's/[\\|&]/\\&/g') if test $with_filename -eq 1; then sed_script="s|^[^:]*:|${i}:|" else
signature.asc
Description: Digital signature