Re: Backup script runs on AIX but not on Linux
Date: Mon, 05 Jan 2009 20:14:05 -0600
I have some decent backup scripts that used ksh on AIX and Solaris for years. When I put them on a Linux (Redhat) server I got the exact error you are getting.
I looked and looked to find the problem, to no avail because syntactically the scripts were fine.
A Sysadmin I worked with asked me how I put the script on the Linux server. I had transfered the scripts with scp. He said that was the problem.
Naturally I was skeptical at best. I mean, how could that be the problem? He wouldn't even attempt to explain it, I later learned that was how he was.
So to prove the point I cut and pasted the script into a vi session and it ran fine. He says there were some special characters embedded by the version of ssh/scp and that he has seen it before. I was dumbfounded but happy that the scripts were fine.
I did uncover several differences in the version of the korn shell for Linux and AIX/Solaris and eventually converted the scripts to bash.
Let me know if this helps - I would be really curious if someone else ran into this.
> On Mon, Jan 5, 2009 at 9:45 PM, J. Dex <cemail_219_at_hotmail.com> wrote:
>> I've got a backup script that runs fine on AIX. I copied it over to Linux,
>> but it doesn't work and I get the following when trying to execute it which
>> looks like something related to the shell:
>> oracle:/u01/app/tools> ./Backup.sh sidname
>> ksh: ./Backup.sh: No such file or directory
>> I have already:
>> Checked to make sure there are rwx permissions on the file
>> Made sure that /ksh is in the /bin/ksh directory as specified by the file
>> Checked to make sure that /bin/ksh is listed for Oracle in /etc/passwd
>> Any ideas?
>> Send e-mail anywhere. No map, no compass. Get your Hotmail(R) account now.