Redirection: stdout to file
command > file.txt
Redirection: stderr to file
command 2> file.txt
Redirection: stdout and stdout to file
command &> file.txt
Piping: stdout to stdin
command1 | command2
Piping: stderr to stdin
command1 2> >(command2)
Piping: stdout and stdout to stdin
command1 |& command2