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
What is scripting used for?
How do we delete all blank lines in a file?
Why do we write bin bash in shell scripts?
How to write a function?
Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.
Explain about the exit command?
What is shell and terminal?
What are the different variables present in linux shell?
How do I open the shell prompt?
What is console line?
What language is used in terminal?
What are the two files of crontab command?
How do I run a powershell script?
What is the best scripting language?
What is bash command used for?