Domanda

I am looking for a Unix command that enables to "source" the text in a gzip compressed text file.

If my explanation is not clear enough, I mean to a command that first unzips the file and then runs the original command on it, like zgrep, zcat, zless, etc. do

Thanks!

È stato utile?

Soluzione

Elaborating shellter's approach, you could use

eval `gunzip -c file2source.gz|tr \\n \;`

for simple scripts. (I say simple because the command lines in the file are concatenated into one line.)

Other than that,

to unzip into a real file, and source that,

seems to be the only way.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top