When writing a shell script on an Agent computer, which is run as a Control-M/Sever job, you need to do the following:
BMC recommends that you run each script manually to validate the script syntax before running the script.
Scripts