*article and comment trail imported from previous forum platform.

How do I utilize the -c option of gzip? I wish to retain the original file. I'm trying to redirect to stdout with syntax below but it renders the output to the screen.

gzip c file.dta >file.dta.gz




COMMENT 1:
Comment by Noah Davids | 4/7/2009 12:06pm

It works for me

bash-2.04$ gzip -c 1meg > foo
bash-2.04$

Note that I am running under bash. If you are run under the standard VOS command prompt the ">" character is traeted as a directory and is ignored

gzip -c 1meg > foo

`F0`F1`BB|`05`F8`F8]'BE`02|`FC._`01>~`97`AF`00`1F`BF`CBW`80`8F`DF`E5+`C0`C7`EF`F
`F0`F1`BB|`05`F8`F8]'BE`02|`FC._`01>~`97`AF`00`1F`BF`CBW`80`8F`DF`E5+`C0`C7`EF`F
. . .
`F0`F1`BB|`05`F8`F8]`BE`02|`FC.`FF`7F`BA`B5`DA`C5`00`00`10`00gzip: > is a direct
ready 09:00:32