ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Script sh failing in Solaris 10 with bad substitution or is not an identifier

book

Article ID: 236857

calendar_today

Updated On:

Products

CA Automic Dollar Universe

Issue/Introduction

On a Solaris10, I build a CMD script pointing to an existing script that performs multiple export commands and substitutions and it Aborts when launched with Dollar Universe with the following errors:

COMMAND: /tmp/script.sh
/tmp/script.sh: bad substitution
/tmp/script.sh: sJob=: is not an identifier

The script looks like this:

export sJob=`basename "${0%.sh}"`
export TRACEFILE=$DIR_LOG_IMP/${sJob}_`date +%Y%m%d_%H%M`.TRA

But if I launch the script on a shell, it works, same as if I launch it with a Uproc of type CL_INT

Cause

Issue with the old ksh available in the Solaris 10 server (ksh88 instead of ksh93).

Environment

Release : 6.x

Component : DOLLAR UNIVERSE

OS: Unix with ksh88 only

Resolution

Workaround:

Launch the script via a CL_INT uproc or replace the shell in the script from /bin/sh or /bin/ksh to /bin/bash

Solution:

Upgrade ksh to version ksh93 (93u+ instead of 88u+)