26 ms·
Those are exactly two things I don't agree. > Executables must start with #!/bin/bash Either they never use *BSD, or they put their bash there. Unbelievable
by jxy 10y ago
Those are exactly two things I don't agree.
> Executables must start with #!/bin/bash
Either they never use *BSD, or they put their bash there. Unbelievable choice.
> If you find you need to use arrays for anything more than assignment of ${PIPESTATUS}, you should use
I use array all the time and never used PIPESTATUS. So what?
- ymse 10y agoFrankly, I find hard-coding #!/bin/bash sensible in a large corporate setting such as Google. It prevents PATH manipulation and they obviously have a uniform and controlled environment. Bash arrays can be convenient, but at that level of complexity Python or Ruby are much easier to read and understand (and necessarily maintain).
- riskrisk 10y ago> .. they never use *BSD .. pretty much
- asuffield 10y ago(Tedious disclaimer: my opinion only, not speaking for anybody else. I'm an SRE at Google.) We run everything on prodimage, so operating system compatibility isn't really an issue. Realistically, any time somebody sends me a code review with a shell script in it, my first comment is going to be "Why is this a shell script? Rewrite it in a supported language."