YUANya

导航

 
#!/usr/bin/perl

use strict;
use warnings;
use Getopt::Long;

my ($number,$in,$out);
GetOptions(
    "number:i"=>\$number,
    "in:s"=>\$in,
    "out:s"=>\$out
);

#my $all = $number +1;print $all;

open IN,"gzip -cd $in|";

open OUT,"|cat >>$out";

while (<IN>)
{
    print OUT "$_";
}

#$ perl t.pl -in 1.txt.gz -out output

#$ less 1.txt.gz 
#11111111111111111111
#yyyyyyy
#jjjjjjjjjjj
#nnnnnnnnnnnnnnn
#111111111111111111111

#$ cat output
#11111111111111111111
#yyyyyyy
#jjjjjjjjjjj
#nnnnnnnnnnnnnnn
#111111111111111111111

 

posted on 2019-07-10 11:22  YUANya  阅读(192)  评论(0编辑  收藏  举报