Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi all, I am trying to build a script that runs on AIX, Solaris, and various flavors of Linux as well. It is very simple, or so I thought. I have the AIX and Solaris servers working well. Next I tried to get my workstation to run the script and it bombed. I am running Fedora 12 x86_64, but that isn't really important. I have various flavors of Linux. Some CentOS, RH, and even a Gentoo server. The script I have runs every hour on all servers. I can push out changes and install software with it, but the Linux WS won't run it. Here is my script:
if [[ $uname = $os1 ]] then
if [[ $uname = $os2 ]] then
if [[ $uname = $os3 ]] then
And here are the errors:
/tools/HourlyProcess/HourlyProcess_Kickoff: line 6: syntax error near unexpected token `then'
/tools/HourlyProcess/HourlyProcess_Kickoff: line 6: `if [[ $uname = $os1 ]] then'
Is this just an issue with going between ksh and bash?
Thanks, in troubleshooting the Solaris portion I had to remove the #!/bin/ksh at the top of the script. I doing all of that I also removed the ; before the then as well. It is working everywhere now, I didn't even notice that was gone until you brought it up.
Last edited by snakernetb; 02-16-2010 at 01:32 PM.