gzcat

来自「source of perl for linux application,」· 代码 · 共 30 行

TXT
30
字号
#!/usr/local/bin/perluse IO::Uncompress::Gunzip qw( $GunzipError );use strict ;use warnings ;#die "Usage: gzcat file...\n"#    unless @ARGV ;my $file ;my $buffer ;my $s;@ARGV = '-' unless @ARGV ;foreach $file (@ARGV) {        my $gz = new IO::Uncompress::Gunzip $file         or die "Cannot open $file: $GunzipError\n" ;    print $buffer        while ($s = $gz->read($buffer)) > 0 ;    die "Error reading from $file: $GunzipError\n"         if $s < 0 ;        $gz->close() ;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?