3 ms·
I have inherited about 4K LOC Bash, which mostly works as advertised. No one wants to touch it! suggestions ?
by mistrial9 7y ago
I have inherited about 4K LOC Bash, which mostly works as advertised. No one wants to touch it! suggestions ?
- stjohnswarts 7y agoLeave it alone if you don't need to modify it. If you start needing to modify it a lot start rewriting it in ruby, go, or python at that point. Use set -x at the top of the file to get an idea on what's going on.
- tjpnz 7y agoAssuming it's all in one file I would move related pieces of functionality into separate files and and then source them when necessary. Should make things more manageable for people only wanting to make small changes.
- andrewl-hn 7y agoSkim https://learnxinyminutes.com/docs/bash/ https://learnxinyminutes.com/docs/bash/ Then open the code and just go through it. Check everything you find unfamiliar with that cheat sheet. If it doesn't cover something in your code, write it down to research separately later.