I executed this script in a Linux system and it could be executed without errors.
So, it seems that the error you are getting is AIX specific.
The error you are getting means, there is a ` character but there is no closing ` character for it..
For example ; let's write a one liner script as below;
erman.ksh
---------------
echo `date '
You see I didn't put closing ` character after date, but I put the character ' instead.
Now I m executing it and getting the error you are getting;
[root@exatest erm2]# ksh erman.ksh
erman.ksh: syntax error at line 1: ``' unmatched
So, as you see there should be the same issue in your script.
However, I can not see a similar issue like that and when I execute your script with ksh in Linux, I don't get any errors..
1)So how do you execute this script? Send me the screenshot that I can show the execution and the error.
2)Send me the output of the following -> ksh -n script_name
Script should be modified to give output in Linux..
It is beacuse it was written for AIX.
I modified the script and it generated output successfully in Linux. But it is not in the scope of this issue.
The issue is the error you getting in your AIX.
The error is "./script.sh[48]: 0403-057 Syntax error at line 67 : ``' is not matched. "
I tried the script in an AIX 5 environment.. It run successfully.
So I started to think that you are copying pasting it wrongly to your AIX environment.
Check the script and ensure that the ` characters are properly there.. Ensure there is no copy paste issue...