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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -