Question
What does it do? I read that it downloads things from Stdin, but where do you actually need it?
Conclusion
some_program | wget -i - -P ./directory
wget gets urls as Stdin from some_program. The input will result in output generated by wget to ./directory.
wget -i ./file
The above command gets urls form ./file, and it generates output to the current directory. The crux difference is the lack of - sign to the above command.
Solution
I can imagine it being useful when piping output from another program:
linkdiscoverer | wget -i - ./directory
(For some suitable linkdiscoverer
program.)
I'm not sure the ./directory
bit is really what you want though. Did you mean to use -P ./directory
to save files into the specified directory?
OTHER TIPS
I read that it downloads things from Stdin, but where do you actually need it?
Maybe re-read man pages again:
‘-i file’
‘--input-file=file’
Read urls from file. If ‘-’ is specified as file, urls are read from the standard input. (Use ‘./-’ to read from a file literally named ‘-’.)