Error executing UNIX shell script from after job routine
Posted: Wed Feb 04, 2009 5:21 am
Hi,
Am having a script to execute after Job finishes, and i have specified it in the After Job Routine in (ExecSh) of the DS Job.
The script name is rejectfile.sh
And the script file contains
if
[[ `awk 'END{print NR}' /RejectFiles/Extractrejectfile.csv` -gt 1 ]]
then
uuencode /RejectFiles/Extractrejectfile.csv Extractrejectfile.csv|mailx -s Extract Errorfile xyz@hotmail.com
else
echo "File is empty"
fi
If i run this script in the UNIX, its executing correctly. But if i run using the DS job after job routine am getting the following error.
/RejectFiles/rejectfile.sh: [[: not found
File is empty
Can you pls help me out, how to achieve this.
Rgds,
Senthil MP
**Note: Subject changed to be more descriptive - Content Editor **
Am having a script to execute after Job finishes, and i have specified it in the After Job Routine in (ExecSh) of the DS Job.
The script name is rejectfile.sh
And the script file contains
if
[[ `awk 'END{print NR}' /RejectFiles/Extractrejectfile.csv` -gt 1 ]]
then
uuencode /RejectFiles/Extractrejectfile.csv Extractrejectfile.csv|mailx -s Extract Errorfile xyz@hotmail.com
else
echo "File is empty"
fi
If i run this script in the UNIX, its executing correctly. But if i run using the DS job after job routine am getting the following error.
/RejectFiles/rejectfile.sh: [[: not found
File is empty
Can you pls help me out, how to achieve this.
Rgds,
Senthil MP
**Note: Subject changed to be more descriptive - Content Editor **