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



I want to upload a file to remote server through ftp daily.Can anyone suggest how to make a shell s..

Answer / 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

More Shell Script Interview Questions

In shell scripting if text is surrounded by single quotes what does it denotes?

3 Answers  


What makes c shell a more preferable option than the bourne shell?

0 Answers  


What is the meaning of $1 in shell script?

0 Answers  


What does $0 mean in shell script?

0 Answers  


What are the additional egrep symbols?

2 Answers  






How to get the first line from a file using just the terminal?

0 Answers  


In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?

0 Answers  


What is the default ubuntu terminal?

0 Answers  


how to find weblogic version through linux cammand

1 Answers   L&T,


What are different types of shell?

0 Answers  


What are the 4 basics of OOP?

1 Answers   Amazon, Infosys,


Explain about login shell?

0 Answers  


Categories