Shell script run error ksh: not found


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script run error ksh: not found
# 1  
Old 03-24-2008
Shell script run error ksh: not found

Hi All,

I am trying to run a script to FTP files from one UNIX server to another UNIX server. Actually I can able to FTP file successfully by manually or paste whole script at prompt. But when I am trying to run script it is giving error.

Please let me know the cause.

#!/bin/sh
HOST=164.123.133.11
USER=abc
PASSWD=abc1
cd /app/data/backup
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
bin
cd /app/data
put abc.TXT
quit
END_SCRIPT
exit 0
# 2  
Old 03-25-2008
Take a look at expect
# 3  
Old 03-25-2008
Could you please give the error of your script ?
# 4  
Old 03-25-2008
ksh: not found !?!
There is no ksh in here. You should write complete input/output from your script and the correct code.

In general my guess (I'm guessing from the topic description which should be added to the message body) is that you could have #!/bin/ksh in your script instead of #!/bin/sh, or this can be an issue of some other script - and in the same time you have no such binary in the system.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX shell script error: not found

Hello All, I'm working on one Unix shell sript that will actually extract a column data from Oracle table using sqlplus and writes onto a file. I'm getting this error when executing the shell script: rpt.ksh: ^JScott: not found Below is the code in the shell script: `sqlplus -s... (1 Reply)
Discussion started by: venkat_reddy
1 Replies

2. Shell Programming and Scripting

+: not found Error in shell script

Hi , I am a newbie to shell scripting. I am getting the error on AIX machine /tadfdc_setup_fed.sh: +: not found Here tadfdc_setup_fed.sh is script which works fine on Linux Machine. But gives error on AIX (1 Reply)
Discussion started by: Anupam Kakade
1 Replies

3. Shell Programming and Scripting

How to run ksh script in bash shell?

Hi All, I have few bash shell scripts which depends on one Ksh shell script. When i run bash shell scripts, it shows error as bad interpretor : ksh no such bad file or directory. When i tried to install ksh shell, it is not downloading too. If I remove !/bin/ksh command in starting line of the... (14 Replies)
Discussion started by: Karthik03
14 Replies

4. Shell Programming and Scripting

Ksh Shell Script Error

Hi, While running below code i am getting error as below 0403-004 Specify a parameter with this command. Please look it below code and let me know about if condition. Code is As below #!/usr/bin/ksh Infa_Src_Dir=$DIR/SrcFiles/pp Load_Info_Lst_Path=$DIR/SrcFiles/pp... (1 Reply)
Discussion started by: samadhanpatil
1 Replies

5. Shell Programming and Scripting

ssh - run shell script - Error

Hi Team, I am trying to run shell script from one server to another server with below command. ssh abc@pqr.america.com /tmp/test.ksh But, it gives below error. Can someone help me what is the issue? exec(): 0509-036 Cannot load program ssh because of the following errors: ... (3 Replies)
Discussion started by: ace_friends22
3 Replies

6. Solaris

Shell Script gives error when run through cron job.

Hi, The following shell script runs without any problem when executed manulally. USED=$(df -h /arch | tail -1 | awk '{print $5}' | cut -d '%' -f 1) if then find /arch/AUBUAT/ -type f -mtime +0 | xargs rm find /arch/AUBMIG/ -type f -mtime +0 | xargs rm fi But the same gives below... (6 Replies)
Discussion started by: ksadiq79
6 Replies

7. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

8. Shell Programming and Scripting

#!/bin/bash and #1bin/sh command not found error on mac osx terminal/shell script

i am having a weird error on mac os x running some shell scripts. i am a complete newbie at this and this question concerns 2 scripts. one of which a friend of mine wrote (videochecker.sh) a couple weeks ago and it's been running fine on another machine. then last week i wrote capture.sh and it... (2 Replies)
Discussion started by: danpaluska
2 Replies

9. Shell Programming and Scripting

found error 138 while run shell script

I found error 138 while run a shell script. Please tell me what it's mean?? and how can i prevent that error. Thanks in advance..... (1 Reply)
Discussion started by: rinku
1 Replies

10. Shell Programming and Scripting

Script not found to run

In one environment I cannot run a shell script, which can run on other environment both has same rights. Even though I try to run from the same dir, it gives me an error, mentioning - script not found. But this same script can be found, if we run find command. Script starts with #!/bin/sh ... (1 Reply)
Discussion started by: videsh77
1 Replies
Login or Register to Ask a Question