![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| when porting from HP-UX to Linux | amitpansuria | Linux | 1 | 04-17-2008 11:08 PM |
| Porting From Linux To Hpux | anak0nda | High Level Programming | 8 | 10-31-2007 03:51 PM |
| pgrep substitute for porting a linux script to AIX 5.x | thebytegrill | AIX | 3 | 08-23-2007 04:28 AM |
| Porting of Shell to AIX | dhanamurthy | High Level Programming | 5 | 03-07-2007 07:37 AM |
| HP-UX to linux porting | arunprakash | UNIX for Dummies Questions & Answers | 0 | 02-21-2005 02:49 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
porting shell script from Linux to AIX.
Hi,
I am porting one shell script from Linux to AIX. I had .ksh file and i have changed it to .sh file for aix. on linux this script is running fine but on aix it gives me "unexpected end of file" error. Could any one suggest me what to do to port this script error free? Thanks in advance!! Joy |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Changing the extension of a file does not change what shell executes it. You need to change the first line. Fyi - sh and ksh are the same thing on AIX.
How did you transfer the file over? Did you FTP in binary mode by any chance? What does the output of file yourscript.sh return? What does the output of cat -v yourscript.sh return? Do you see embedded characters? |
|
#3
|
|||
|
|||
|
Quote:
|
|
#4
|
|||
|
|||
|
thanks for ur reply frank!
I did change the first line from #!/bin/sh to #!/bin/ksh. i transfered the file over ftp only and in binary mode. when i execute the file it says - unexpected EOF while looking for matching ``' syntax error: unexpected end of file though i have not changed anything in the file. there are no extra embedded characters in the file. |
|
#5
|
|||
|
|||
|
run ksh -n script.ksh
This should give you the line where the syntax error is can you post the entire script? |
|
#6
|
|||
|
|||
|
I dont think i am allowed to put this script over net. this is not a single script file. it calls many other files also.
the line where it gave me error was an echo statement. echo "DEBUG(gcFunc): TEST_DIR --> ${TEST_DIR}" the error is : Syntax error at line 537 : `>' is not expected. if i remove this '>' from the statement it gives me error in another echo statement- echo "${scriptname} -c <cluster-alias> -t <tester-name> -a <application-template> [-i <wls-jdk-home>]" saying-Syntax error at line 656 : `<' is not expected and even after removing '<' from line 656, it gives error in the following line- TEST_CONFIG="" Syntax error at line 707 : `"' is not matched but i can not remove this line. i have searched whole file for any unmatching ' " '. but there is'nt any. |
|
#7
|
||||
|
||||
|
Perhaps you have somehow converted into DOS format?
|
||||
| Google The UNIX and Linux Forums |