Re: assign default value to variables I assign from split
[email protected] ("John W. Krahn")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
Richard Lee wrote:
> John W. Krahn wrote:
>>
>>
>>> open FILE, "ls -tr | zcat -d $directory/$file |", or die qq/you
>>
>> My version of zcat does not have a -d switch, what does it do on your
>> system? It appears that "ls -tr | " in front of zcat is superfluous?
>> What do you think it will do there?
>
> Just to follow up on this,
>
> zcat -d option does below
>
> [root@myserver ~]# zcat -?
> zcat 1.3.5
> (2002-09-30)
> usage: zcat [-cdfhlLnNrtvV19] [-S suffix] [file ...]
> -c --stdout write on standard output, keep original files unchanged
> -d --decompress decompress
Just to follow up on your follow up:
$ zcat -?
Try `gzip --help' for more information.
$ zcat -V
gzip 1.3.12
Copyright (C) 2007 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Jean-loup Gailly.
$ man zcat
GZIP(1)
NAME
gzip, gunzip, zcat - compress or expand files
SYNOPSIS
gzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ... ]
gunzip [ -acfhlLnNrtvV ] [-S suffix] [ name ... ]
zcat [ -fhLV ] [ name ... ]
Note that the -d switch applies to gzip only. zcat by definition is
*supposed* to decompress files. (Why would zcat *compress* files?)
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall