News for hackers. Stuff that matters.
Re:Shell Style Guide by geofft on Tuesday May 15, 2018 @09:07AM (#17073613)
The only thing I'd quibble with is the recommendation of [[ ... ]] over [ ... ], because shell programmers used to [ will be surprised that [[ "foo" == "f*" ]] does pattern matching. But that is more or less an arbitrary style preference.

One thing I'm curious about is whether Google machines have followed Debian etc. in making /bin/sh a faster non-bash shell, or if /bin/sh is bash.

Re:Shell Style Guide by dualbus on Tuesday May 15, 2018 @09:25AM (#17073710)
> will be surprised that [[ "foo" == "f*" ]] does pattern matching

It will not do pattern matching, because you quoted the right-hand side.

Re:Shell Style Guide by geofft on Tuesday May 15, 2018 @11:05AM (#17074452)
... ... okay, now I extremely object to [[ "foo" == f* ]] not doing globbing and doing pattern matching. But, I guess Google folks have experience that this is non-confusing?
Re:Shell Style Guide by your-nanny on Tuesday May 15, 2018 @09:40AM (#17073818)
Which is totally fucking indane
Re:Shell Style Guide by kevincox on Tuesday May 15, 2018 @05:25PM (#17077990)
> One thing I'm curious about is whether Google machines have followed Debian etc. in making /bin/sh a faster non-bash shell, or if /bin/sh is bash.

Since the guide says "Executables must start with #!/bin/bash" it doesn't really matter.

Re:Shell Style Guide by JepZ on Tuesday May 15, 2018 @09:21AM (#17073674)
Same here. Dropping non-bash support just for [[ ... ]] over [ ... ] seems a little odd.
Re:Shell Style Guide by mrdmnd on Tuesday May 15, 2018 @12:33PM (#17075214)
I'm on a google machine now and it's a symlink to /bin/bash.