The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
found error 138 while run shell script rinku Shell Programming and Scripting 1 06-01-2008 11:29 PM
when executing .sh script in telnet error "script not found" smiley Shell Programming and Scripting 1 04-22-2008 10:01 AM
awk Shell Script error : "Syntax Error : `Split' unexpected Herry UNIX for Dummies Questions & Answers 2 03-17-2008 07:16 AM
Installer script -- function not found error asutoshch Shell Programming and Scripting 1 07-10-2006 11:07 AM
Newb scripting question, I get the error script not found Arkitech Shell Programming and Scripting 3 05-04-2006 07:55 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-24-2008
Registered User
 

Join Date: Mar 2008
Posts: 1
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
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-25-2008
Moderator
 

Join Date: Dec 2003
Location: /ksh93
Posts: 864
Take a look at expect
Reply With Quote
  #3 (permalink)  
Old 03-25-2008
Registered User
 

Join Date: Jul 2004
Location: Belgium
Posts: 5
Could you please give the error of your script ?
Reply With Quote
  #4 (permalink)  
Old 03-25-2008
Registered User
 

Join Date: Sep 2007
Location: Poland
Posts: 63
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.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0