piping and redirection
xargs – takes results from one command and uses them as arguments to another command.
<command1> | xargs <command2>
tee – takes stdin and prints to file and prints to screen. Thus to be able to capture and see output
<command1> | tee <filename>
Redirection
<command> > file.txt 2>&1
This sends stdin and stdout’s output to file.txt