Solved fetch: possible to write downloaded file to stdout?

I haven't yet found a way how to make fetch output the downloaded file to stdout.
fetch -o stdout doesn't work, creates a file 'stdout' on disk.

Do you know a way to achieve that using fetch?

(I could ofc just use wget instead of fetch, but that is not part of base system)
 
Superb!
This trick is not mentioned in the man page...

Thank you very much obsigna!

Edit: I was wrong... thanks to @ShellLuser for correcting me! I promise to read man pages more carefully :(
 
Superb!
This trick is not mentioned in the man page...
It is, just check fetch(1):

Code:
     -o file, -output=file
                 Set the output file name to file.  By default, a ``pathname''
                 is extracted from the specified URI, and its basename is used
                 as the name of the output file.  A file argument of `-'
                 indicates that results are to be directed to the standard
                 output.  If the file argument is a directory, fetched file(s)
                 will be placed within the directory, with name(s) selected as
                 in the default behaviour.

     -q, --quiet
                 Quiet mode.
 
The "special" filename '-' can often be used to read from STDIN or write to STDOUT. If the command itself doesn't directly use STDIN/STDOUT you can often read from or write to '-' to achieve the same thing.
 
Back
Top