AIX script

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

AIX script

Roshan
Hello Erman,

i am running a script for auditing on AIX. When I am executing the script, it gives me

./script.sh[48]: 0403-057 Syntax error at line 67 : ``' is not matched.
AIX_Script_v2.sh
Reply | Threaded
Open this post in threaded view
|

Re: AIX script

ErmanArslansOracleBlog
Administrator
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



Reply | Threaded
Open this post in threaded view
|

Re: AIX script

Roshan
Capture1.PNG
Capture2.PNG

Please find attached.
Reply | Threaded
Open this post in threaded view
|

Re: AIX script

Roshan
I executed the script on linux instance(database). The application instance was AIX. In which directory is the output?
Reply | Threaded
Open this post in threaded view
|

Re: AIX script

Roshan
Reply | Threaded
Open this post in threaded view
|

Re: AIX script

ErmanArslansOracleBlog
Administrator
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...
Reply | Threaded
Open this post in threaded view
|

Re: AIX script

Roshan
Now it works fine. I created a file and copy pasted it. I gave full permissions to it(chmod 777). It ran fine.

Thx
Reply | Threaded
Open this post in threaded view
|

Re: AIX script

ErmanArslansOracleBlog
Administrator
:) so as I said it was a copy paste issue then. Not related with chmod, because it is not a runtime error.

29 Ara 2016 13:26 tarihinde "Roshan [via Erman Arslan's Oracle Forum]" <[hidden email]> yazdı:
Now it works fine. I created a file and copy pasted it. I gave full permissions to it(chmod 777). It ran fine.

Thx


If you reply to this email, your message will be added to the discussion below:
http://erman-arslan-s-oracle-forum.2340467.n4.nabble.com/AIX-script-tp1820p1834.html
To start a new topic under Scripting Bash / Sql / Perl, email [hidden email]
To unsubscribe from Erman Arslan's Oracle Forum, click here.
NAML