Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The Google style guide is a good reference: https://google.github.io/styleguide/shellguide.html#s1.2-whe...

  - If you are writing a script that is more than 100 lines long, or that uses non-straightforward control flow logic, you should rewrite it in a more structured language now. Bear in mind that scripts grow. Rewrite your script early to avoid a more time-consuming rewrite at a later date.
  - When assessing the complexity of your code (e.g. to decide whether to switch languages) consider whether the code is easily maintainable by people other than its author.


Cute, but a few years back $client was an early-ish adopter of Anthos Service Mesh (Google-managed(ish) Istio for GKE), and to install it we had to run a Bash script that was over 1,000 lines long.

When we questioned the Google engineer assigned to support us, he snickered and said "you can trust it".




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

Search: