3 ms·
The only thing I'd quibble with is the recommendation of [[ ... ]] over [ ... ], because shell programmers used to [ will be surprised that [[ "foo" == "f*" ]]
by geofft 9y ago
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.
- JepZ 9y agoSame here. Dropping non-bash support just for [[ ... ]] over [ ... ] seems a little odd.
- dualbus 9y ago> will be surprised that [[ "foo" == "f*" ]] does pattern matching It will not do pattern matching, because you quoted the right-hand side.
- your-nanny 9y agoWhich is totally fucking indane
- geofft 9y ago... ... 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?
- mrdmnd 9y agoI'm on a google machine now and it's a symlink to /bin/bash.
- kevincox 9y ago> 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.