Redirect / Pipe wget download directly into gunzip

pogibas picture pogibas · Apr 28, 2013 · Viewed 9.8k times · Source

I want to download and to gunzip file.

  wget ftp://ftp.direcory/file.gz
  gunzip file.gz

Works fine.

However I want to simplify such command and tried this:

 gunzip <(wget ftp://ftp.direcory/file.gz)

wget downloads file, but gunzip task doesn't start.

Where is my mistake?

Answer

Basile Starynkevitch picture Basile Starynkevitch · Apr 28, 2013

Try

  wget -O - ftp://ftp.direcory/file.gz | gunzip -c > gunzip.out

Read more the wget documentation.