time curl http://www.google.com | tee | wc | gzip > google.gz
Why doesn’t this command work? It creates the file, and times the operation, but does not print the number of lines, words, and characters (wc).
time curl http://www.google.com | tee | wc
This will print print the words characters and lines, but obviously, the tee portion is pointless.
Is it because I’m sending the word count of the url to google.gz?
I have to use tee, gzip, time, curl to download google web page to a gziped file, print the word count, how long it took.
It is an assignment, so I’m not looking for someone to do it for me. I just am having a problem in that I can’t tee to utility, and I cant to and gzip at the same time.
Maybe there is a way to use gzip with curl?
I’m going to guess that something like this is what you want: