I want to upload a file to remote server through ftp
daily.Can anyone suggest how to make a shell script for
that.I hv credentials for that ftp
Answer Posted / geichel
#!/bin/bash
/bin/ftp -inv ip_address_of_target_station<<ENDFTP
user ftpusername ftpuserpassword
cd folder_on_target
bin
lcd folder_on_local
put filename.txt
bye
ENDFTP
# Alternatively some ftp packages let you put a script in
$HOME/.netrc
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do we create command aliases in a shell?
What are the two files of crontab command?
What is the best shell scripting language?
Why is a script important?
What is the use of a shebang line?
What is the difference between scripting and coding?
Write a command sequence to find all the files modified in less than 2 days and print the record count of each.
What is .sh file in mac?
What language is bash written in?
What is the use of "$?" Sign in shell script?
I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.
How do I stop script errors?
How to print the first array element?
What is basename in shell script?
What is the difference between break and continue commands?