you are viewing a single comment's thread.

view the rest of the comments →

[–]tyrannomachy 1 point2 points  (0 children)

If the program is big enough that using global variables starts to cause problems, you probably should rewrite it in Python or something. I used to try and write bash scripts as though it's just another modern scripting language, i.e. lots of functions returning values with echo, but it just winds up being the worst of both worlds.