Reputation: 839
I have 2 *.gz files. I want to cat them (zcat) and pipe them to a command as its inputs.
zcat file1.gz
zcat file2.gz
then pipe them in order as input
| script file1 file2 >
Upvotes: 3
Views: 2332
Reputation: 66
If you're using bash or zsh, you can do this:
script <(zcat file1.gz) <(zcat file2.gz)
It's a bit more difficult otherwise, and I would probably use named pipes.
Upvotes: 5