#!/usr/bin/perl -w
# $Id: ongzip,v 1.1.1.1 2005/07/03 06:02:18 kiesling Exp $

$ENV{PATH} = '/bin:/usr/bin:/usr/local/bin';

my ($gzip_prog) = (`which gzip` =~ /([\w\/]+)/);
return -1 if (! -x $gzip_prog);

if (($#ARGV != 1) || ($ARGV[0] eq '-h')) {
    print STDERR "usage: ongzip infile outfile\n";
    exit 1;
}
$ARGV[0] = quotemeta $ARGV[0];  $ARGV[1] = quotemeta $ARGV[1];
# `gzip -cd $ARGV[0] > $ARGV[1]`;
system "$gzip_prog -dc $ARGV[0] > $ARGV[1]";

exit $?;

