diff options
author | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2008-02-09 13:04:01 +0000 |
---|---|---|
committer | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2008-02-09 13:04:01 +0000 |
commit | cf99a6bebb9c77c6b8e5a5bb6017ec462e0c2046 (patch) | |
tree | a9467b243a2ec0654838d844b35a9413c63740a2 | |
parent | 52453261e9b33312de2c69daf6e85f830377c7af (diff) | |
download | src-cf99a6bebb9c77c6b8e5a5bb6017ec462e0c2046.tar.gz src-cf99a6bebb9c77c6b8e5a5bb6017ec462e0c2046.zip |
Fix a few obvious errors in the znew(1) script.
PR: bin/120249
Submitted by: Jaakko Heinonen <see the PR for email>
Notes
Notes:
svn path=/head/; revision=176133
-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 e3e4cce29c3a..3aae09ca8201 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" |