Operating System - HP-UX
1833005 Members
3144 Online
110048 Solutions
New Discussion

Re: Affect on scripts when transfering from AIX to HP-UX

 
Michael Campbell
Trusted Contributor

Affect on scripts when transfering from AIX to HP-UX

We're transfering from AIX 4.3.3 to HP-UX 11.0 but C-shell scripts that we had running on AIX will need to be moved over to this HP-UX machine. Obviously some of the syntax will not be recognised on HP so we're wondering is there a tool we can run which will check the scripts to see where the syntax is wrong? - Otherwise we just have to run all scripts on HP and let the machine tell us the synax errors and fix them one by one which is very time consuming....
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: Affect on scripts when transfering from AIX to HP-UX

Hi:

One simple, syntatical check would be:

# csh -x script

...or:

# csh -X script

See the 'csh' man pages for more information.

Regards!

...JRF...
Shannon Petry
Honored Contributor

Re: Affect on scripts when transfering from AIX to HP-UX

c-shell is c-shell, so the script should work just fine. Now there are definatly problems if binaries are called from within the script, but the syntax for getting to them should not be an issue.

I.E.

AIX: df -sk
HP-UX: bdf

df -sk will not work on HP-UX, the "s" option is not supported.

However,
foreach FILE ( `ls /tmp` )
rm -f $FILE
end

will work fine on both platforms.

Regards,
Shannon
Microsoft. When do you want a virus today?
Zafar A. Mohammed_1
Trusted Contributor

Re: Affect on scripts when transfering from AIX to HP-UX

Syntax of c-shell will be the same on both AIX & HP. There might be differences in unix commands, but not in c-shell syntax.

Thanks
Zafar
Jo Davis
Advisor

Re: Affect on scripts when transfering from AIX to HP-UX

if you run the scripts with a -n option, it will check the syntax of the script but not execute the script, ie.
csh -n script.name