Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
about wget in ubuntu/debian??
I want to print to a file.txt the output of running the wget utility.
Ex.
if I write in the terminal :
myterminal$> ls >>output.txt
it will generate a file with the information of the directory.
I want to do something like this:
myterminal$>wget http://some.com/some.txt >> output.txt
but it doesn't show anything, I need to parse that output, very bad! Does someone know how to do it?
1 Answer
- 1 decade agoFavorite Answer
Well that is because wget is supposed to be non-interactive. What wget does is, downloads the file from whatever url your specify and saves it to the disk. So for example if you are downloading index.html, it will save the file as index.html. If you want to save it with a different name, which is what you want it seems, you can use -O (hyphen capital o) flag and use - as default name. So you would do something like this ;
wget http://some.com/some.txt -O - >> output.txt
See man wget.
Source(s): man wget