diff options
author | yar <yar@FreeBSD.org> | 2008-02-09 13:04:01 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2008-02-09 13:04:01 +0000 |
commit | 969bd2bc47d529419e722e36a3b54bd5fbe9ffc6 (patch) | |
tree | a9467b243a2ec0654838d844b35a9413c63740a2 | |
parent | 1960b378b5f38a977edd424069fdc04a1cfe120e (diff) | |
download | FreeBSD-src-969bd2bc47d529419e722e36a3b54bd5fbe9ffc6.zip FreeBSD-src-969bd2bc47d529419e722e36a3b54bd5fbe9ffc6.tar.gz |
Fix a few obvious errors in the znew(1) script.
PR: bin/120249
Submitted by: Jaakko Heinonen <see the PR for email>
-rw-r--r-- | usr.bin/gzip/znew | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/gzip/znew b/usr.bin/gzip/znew index e3e4cce..3aae09c 100644 --- a/usr.bin/gzip/znew +++ b/usr.bin/gzip/znew @@ -1,4 +1,4 @@ -#!/bin/ksh - +#!/bin/sh - # # $NetBSD: znew,v 1.2 2003/12/28 12:43:43 wiz Exp $ # $OpenBSD: znew,v 1.2 2003/08/05 18:22:17 deraadt Exp $ @@ -60,8 +60,7 @@ process () { trap 'rm -f "$tmp"; exit 1' HUP INT QUIT PIPE TERM # Do the actual work, producing a file "$tmp" - if uncompress -f -c < "$filez" | gzip -f $gzipflags -o "$tmp"; then - + if uncompress -f -c < "$filez" | gzip -f -c $gzipflags > "$tmp"; then if test $kflag -eq 1 && smaller "$filez" "$tmp"; then echo -n "$prog: $filez is smaller than $filegz" echo "; keeping it" @@ -120,7 +119,7 @@ while getopts :ftv9PK i; do esac done -shift OPTIND-1 +shift $((OPTIND - 1)) if test $# -eq 0; then echo "$usage" |