I have a moderately long(for me at least) bash script file that that maintains a list of LAN users and the bandwidth each one uses. It is 199 lines with 11 functions and is already calling 3 different files. At most it calls 3 functions at least 1 every 5 minutes.Should I separate each function into its own file, or is this still small enough to run in 1 file?
One Script file or Multiple Script Files
optimization;scripting;shell;bash
This is a very common question for any programming language, and the answer is surprisingly simple.  Do what makes sense and makes the program better.Here are qualities that make a program/script better in no particular order:Ease of understandingEase of maintenanceEase of extensionAbility to be tested and debuggedPortabilityPerformanceIf separating the code into multiple files increases any of these metrics without sacrificing the others, then you should do it.  If it does not, then you should avoid it.  It is sometimes difficult to determine if these metrics are being positively affected.  Furthermore many of these qualities can be subjective.  To get a better perspective on your code I would encourage you to submit the code for review by your peers and senior developers in said area.  Code review is one of the best tools programmers have to hone their ability to discern the above qualities.