From 969bd2bc47d529419e722e36a3b54bd5fbe9ffc6 Mon Sep 17 00:00:00 2001 From: yar Date: Sat, 9 Feb 2008 13:04:01 +0000 Subject: Fix a few obvious errors in the znew(1) script. PR: bin/120249 Submitted by: Jaakko Heinonen --- usr.bin/gzip/znew | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'usr.bin') 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" -- cgit v1.1