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 the fastest scripting language?

950


What is the use of "$#" in shell scripting?

1006


Is shell script a programming language?

985


What is shift command in shell script?

974


How do scripts work?

1005


What is shell scripting?

993


What is a beat in a script?

1001


What can you do with powershell?

1077


Is bash an operating system?

938


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.

1242


How to debug the problems encountered in the shell script/program?

1084


Why are shell scripts used?

1036


Explain about return code?

1030


What is inside a seashell?

1088


What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?

1017