Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is sed in shell script?

1060


Given a file find the count of lines containing the word "abc".

1562


How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?

1105


What does echo $0 do?

984


What are the different variables present in linux shell?

1113


How can the contents of a file inside jar be read without extracting in a shell script?

1128


What is option in shell script?

1023


What is the first line in a shell script?

1117


Can you write a script to portray how set –x works?

1005


wats the deinitions for shell utility and filter?

2325


How do I run a shell script on a mac?

1130


What is sudo command?

1066


What does $@ mean bash?

1179


How to pass an argument to a script?

1213


Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

2222