4 ms·
> It suggests that "2>1" and "2> 1" have very different results FYI, "2>1" and "2 >1" already have very different results in Bourne shell. So I don't think it'
by pxeger1 5y ago
> It suggests that "2>1" and "2> 1" have very different results
FYI, "2>1" and "2 >1" already have very different results in Bourne shell. So I don't think it's an unforgivable sin.
- chubot 5y agoYeah this is the crazy thing about shell redirect syntax 2>&1 # descriptor redirect 2>& 1 # identical to above 2 >&1 # runs a command "2" and then does a descriptor redirect And likewise for 2>1 2> 1 2 >1 The 2 is really part of the operator, but the 1 isn't !
- JNRowe 5y agoIck, you're right. I was thinking solely about the change with their version of the "2>&1" vs "2>& 1" case. Although making such an error in my example doesn't seem to invalidate my point. It takes an already odd syntax and makes it subtly different, instead of tightening it up.