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 does ls command work?
What is shell and shell script?
Explain about login shell?
What is a shell made of?
What is sudo command?
how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?
What is a shell? · Types of shell · what is shell scripting?
How would you compare the strings in a shell script?
c program which behaves like a shell(command interpreter). it has its own prompt say "NewShell$".any normal shell command is executed from your shell by starting a child process to execute a system program corrosponding to the command
What is the default shell of solaris?
What language is shell scripting?
How do I open a jshell in cmd?
Differentiate between ‘ and ” quotes.
What is a file basename?
Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.