I'm writing a batch file script to get web comics for me. However, wget sends output to streams 1 and 2 and I want both to go to a file.
wget -nc thiswebcomic.com/current_comic.php >> wget.out
wget -nc morecomics.com/current_comic.php >> wget.out
wget -nc lastcomic.com/current_comic.php >> wget.out
Because of the networking, wget sends output to both stdout and stderr even if there isn't an error in the download. Is there some way to pipe both stdout and stderr to the same file so there is no console output when running this script?
I didn't necessarily want to read the output, so I simply put it in ` quotes. EX: `wget -nc randompage.com` And that did it. Also if I wanted to pipe stderr and stdout to the same output file, I found out I could just do `wget -nc randompage.com 2>> file.txt 1>> file.txt`.