shell - UNIX: redirect some commands with pipe -
i'm new unix. following command i'm executing.
$ time ls | wget exampledomain.com > output.txt
i command output time took retrieve information output.txt. command have creates output.txt it's blank document.
thank you
wget
outputs stderr. use:
wget exampledomain.com > out 2>&1 # or wget exampledomain.com 2>out # or wget exampledomain.com --output-file=log # or, redirect output both file , stdout wget exampledomain.com 2>&1 | tee log
Comments
Post a Comment