In the Unix shell, if I want to combine stderr and stdout into the stdout stream for further manipulation, I can append below following at one end of my command:
2>&1
So, if I want to use the head-on output from g++, I can do something like this:
g++ lots_of_errors 2>&1 | head
so I can see only a first few errors.
I always have trouble remembering this, and I constantly have to go look it up, and it is mainly because I don't completely understand the special syntax of the particular trick.
Can someone break that up and explain step by step what 2>&1 means?