4

As the title states, why are these two commands different? I can see how they are different by simply entering them in a terminal, but I am confused as to why? To me, the second command seems like a more intuitive way to achieve what is accomplished by first; that is, the stderr of command is redirected to stdout, and then the stdout of command is redirected to file. At least, reading from left to right this is what looks like should happen. However, clearly the order of redirection is not as simple as reading from left to right. Can somebody please explain this? Thank you.

tripleee
  • 175,061
  • 34
  • 275
  • 318
b_pcakes
  • 2,452
  • 3
  • 28
  • 45

0 Answers0