How to redirect output to a file and stdout
Asked 07 September, 2021
Viewed 1.8K times
  • 60
Votes

In bash, calling foo would display any output from that command on the stdout.

Calling foo > output would redirect any output from that command to the file specified (in this case 'output').

Is there a way to redirect output to a file and have it display on stdout?

10 Answer