👤
Home Man
Search
Today's Posts
Register

BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

syntax error

Tags
autosys

👤 Login to reply

 
Thread Tools Search this Thread
# 1  
Old 12-23-2005
syntax error

I'm getting a syntax error /bin/sh[5]: Syntax error at line 5 : `(' is not expected. This error only occurs when I run the script from Autosys job scheduler. If I run it from the command line it works OK.

##### `hostname` equals cherry

if [ `hostname` != "elm" ]; then
export ORACLE_SID=DMRT
USER=dmrt
PSWD=`cat /oracle/.connect_DMRT` # I'm asssuming the error is on this line
DAT_HOME=/MMA_temp_staging
LOG_HOME=/opt/prod/DMRT/KC/CASEMIX/log
CTL_HOME=/opt/prod/DMRT/KC/CASEMIX
SQL_HOME=/opt/prod/DMRT/KC/CASEMIX
SH_HOME=/opt/prod/DMRT/KC/CASEMIX
else
export ORACLE_SID=dmrt_dv
USER=jschaffner
PSWD=dev
DAT_HOME=/opt/prod/DMRT/data
LOG_HOME=/opt/prod/DMRT/data
CTL_HOME=/opt/prod/DMRT/data
SQL_HOME=/opt/prod/DMRT/data
SH_HOME=/opt/prod/DMRT/data
fi
##
Thanks. Jeff
# 2  
Old 12-23-2005
In autosys, along with the main job script, we can also give the profile setting file... is it the main script or profile file ? if it is the main script that you are running in autosys, could you please the is any profile file and causing any problem ??

can you also tell me when you run manually, what is your defalt shell
# 3  
Old 12-23-2005
This job has no profile environment. However, I have a similar script
that uses a profile to set the env variables, and works OK from Autosys. I will try to create a profile script and see what happens.
--
Thanks. Jeff
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Observing error :syntax error in expression ashima jain Shell Programming and Scripting 1 02-29-2016 09:19 AM
IF section problem. syntax error: unexpected end of file error jedzio Shell Programming and Scripting 10 08-01-2014 09:03 AM
Ambiguous redirect error and syntax error when using on multiple files Madhusudan Das Linux 16 08-20-2012 05:02 PM
Receiving error: ./ang.ksh[35]: 0403-057 Syntax error at line 116 : `done' is not expected. amitsinha Shell Programming and Scripting 3 05-25-2010 02:44 AM
ERROR: ./launch_full_backup.sh[18]: Syntax error at line 28 : `else' is not expected. villenan Shell Programming and Scripting 2 08-30-2009 06:36 AM
Newbie Question.. -> error: syntax error before ';' token reelflytime Programming 3 07-29-2009 12:54 PM
sed error : Syntax error: redirection unexpected phpfreak Shell Programming and Scripting 3 12-04-2008 04:19 AM
nim mksysb error :/usr/bin/savevg[33]: 1016,07: syntax error astjen AIX 9 10-03-2008 11:44 AM
awk Shell Script error : "Syntax Error : `Split' unexpected Herry UNIX for Dummies Questions & Answers 2 03-17-2008 11:16 AM
I got error like...syntax error on line 1, teletype koti_rama UNIX for Advanced & Expert Users 2 07-07-2007 07:35 PM


All times are GMT -4. The time now is 09:15 PM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?