Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




Yeah 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 !


Ick, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: