FTP - Invalid command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting FTP - Invalid command
# 1  
Old 05-13-2013
FTP - Invalid command

Hi All,

OS - Linux

I wrote a ftp program to download a file. the file is downloading successfully, but a negative message is prompting.

i placed set -vx in code to trace.

Code:
#!/usr/bin/ksh
set -vx
st_date=$(date)
Logfile=/home/user/ftp_dwnload.$st_date.log
cd /home/usr/data/
print "***START FTP PROCESS*********" >> $Logfile
ftp -n << !
open bexhpunix.comm.com
user setuser1 passwd1
cd /home/usr/data
prompt
get FS_FTP.LOG
bye
!
print "***COMPLETED  FTP PROCESS*******" >> $Logfile
cd /home/usr/data/

message while tracing-

Interactive mode off.
?Invalid command
# 2  
Old 05-13-2013
I'm not sure your here-document is working properly.

You have << ! when I think you need <<!

And be sure the ! that ends it is at the very beginning of the line, not indented.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Eeprom security-mode=command cause invalid login

Hi there, In Solaris 8. I have accidentally set the eeprom security-mode=command because I followed the CIS benchmark guideline. Initally, it was eeprom security-mode=none. I have tried to login with the correct password numerous time and it still say permission denied. I have tried to login... (4 Replies)
Discussion started by: alvinoo
4 Replies

2. Shell Programming and Scripting

How to loop read command and print valid invalid states.?

My question is how would i loop a read command to keep asking the user for input and eventually print the no. of valid invalid inputs after a specified control input typed i.e. (-3). (1 Reply)
Discussion started by: Flowoftruth
1 Replies

3. Shell Programming and Scripting

Invalid null command error

Hi, I have this script which gives me output as Invalid null command set recent_file=`grep '^-.*xlsx$' $FTP_LOG |\ sed -e 's/Jan/1/g' \ -e 's/Feb/2/g' \ -e 's/Mar/3/g' \ -e... (6 Replies)
Discussion started by: juzz4fun
6 Replies

4. Shell Programming and Scripting

exec perl in expect script yields "invalid command"

I'm trying to execute something like this: exec perl -i -pe 's/\015/\012/g' '${file}' in my expect script and I get: error "invalid command name \"perl\". however, if I run perl -i -pe 's/\015/\012/g' "/Users/Shared/menu-items.txt" directly in my terminal, it runs fine. I'm an... (4 Replies)
Discussion started by: dpouliot
4 Replies

5. Web Development

Invalid command 'Order', perhaps misspelled or defined by a module not included in the server config

I have Apache v2.0.63 on Solaris 10 (x86 on VM). While starting the apache server, facing the following exception - Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration Googling says to add the entry LoadModule authz_host_module... (0 Replies)
Discussion started by: poga
0 Replies

6. UNIX for Dummies Questions & Answers

ftp command

Hi, I am new to shell scripting, I just wan to know that if i want to do ftp that is I have the url of the remote server that is pngpcdb1.walmat.com , Now i want to do ftp and want to transfer some files...how ftp command in unix would help me in that...!!:confused: (3 Replies)
Discussion started by: rahulsxn660
3 Replies

7. Shell Programming and Scripting

?Invalid Command

when i am executing the script i am getting ?Invalid command though the script is right. Could any one please let me know how to overcome this problem. Urgent Please Thanks a lot in advance (2 Replies)
Discussion started by: Olivia
2 Replies

8. Shell Programming and Scripting

invalid null command

#! /bin/csh set pattern = "" set deli = | foreach i ( `cat pattern`) set pattern = "$pattern$deli$i" end all i want to accomplish is create a string a|b|c, but instead I got an invalid null command error, thanks for your help (1 Reply)
Discussion started by: jdsignature88
1 Replies

9. Shell Programming and Scripting

Invalid Command Name

I have telnet to a machine and executed some commands in it. pls see below : #!/usr/bin/expect spawn telnet 170.10.11.1 2100 expect "login:" send username\r expect "password:" send password\r expect "$" send "touch filetest\r" expect "$" send exit\r expect... (3 Replies)
Discussion started by: sudharsan23
3 Replies
Login or Register to Ask a Question