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


Please Help Members By Posting Answers For Below Questions

How does ls command work?

583


What is shell and shell script?

556


Explain about login shell?

633


What is a shell made of?

555


What is sudo command?

548






how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

3602


‎What is a shell? · ‎Types of shell · ‎what is shell scripting?

550


How would you compare the strings in a shell script?

543


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

4686


What is the default shell of solaris?

567


What language is shell scripting?

579


How do I open a jshell in cmd?

595


Differentiate between ‘ and ” quotes.

611


What is a file basename?

588


Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.

694