I have been writing shell scripts from long time but I never thought of optimizing script to make sure its not using more cpu or memory .. I am looking out for some suggestions or process with which I can very that I am not over utilizing compute resource..

closed as too broad by Mr Shunz, Jesse_b, Kusalananda, glenn jackman, thrig Jan 11 at 17:16

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Unfortunately this question is too broad and opinionated. However generally if CPU and memory utilization are a concern then you should use a non-interpreted language. – Jesse_b Jan 11 at 16:57
  • 1
    I think if you had an example of some long running code you have written it would be on topic to ask for ways to improve it's performance, but there are simply too many performance pitfalls and hangups to ask for a list of them all in one answer. – Jesse_b Jan 11 at 17:00