I'm getting a Terminated output upon running my shell script. The script is huge and confidential so I can't post it here, but I can confirm there are no kill commands in the script.

Unfortunately I can't seem to find out what the problem is, as the "Terminated" output is only happening on one out of several servers.

I've set the debug flag and ran it before, but I got a rather uninformative

+ main
+ 1>> /home/user/app/logs/msg.log 2>& 1

Portion of script this corresponds to

main "$@" >> $LOG 2>&1

gzip $LOG

Would appreciate some suggestions, thank you.

  • Could you say something about what shell the script is written for?
    – they
    Nov 19 at 6:51
  • It looks like the expansion of $@ causes main "$@" >> $LOG 2>&1 to be split into two separate commands. Did you check the contents of $@?
    – frippe
    Nov 19 at 6:53
  • "Terminated" usually happens when the kernel (the OOM killer) kills the process because it was using too much memory. What is the script doing?
    – terdon
    Nov 19 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.