The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
A simple find and replace without using any regex (bash) srikanths Shell Programming and Scripting 2 03-18-2008 04:08 AM
Simple BASH script? JayC89 Shell Programming and Scripting 16 10-02-2007 04:23 PM
Simple date and time calulation in BASH ripat Tips and Tutorials 0 10-08-2006 03:15 AM
Simple bash for loop problem kingdbag Shell Programming and Scripting 4 09-14-2006 10:00 PM
Simple Bash Script xaphalanx Shell Programming and Scripting 3 12-21-2005 11:54 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-21-2006
Registered User
 

Join Date: Mar 2006
Posts: 19
Question simple bash script to ftp?

Hi all

has anyone got a code snippet of how i can ftp a file automatically by running a simple bash script. I have 4 things

IP address xx.xxx.xx.xx
username=satnam
domain = app.sample.ftp
password= satnam_password

Im not sure how to pull these all together to ftp a file?

any ideas?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-21-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,859
Please consider searching the FAQ. This gets asked at least once a week --

Code:
#/bin/ksh
# $1 is the file name
# usage: this_script  <filename>
IP_address="xx.xxx.xx.xx"
username="satnam"
domain = app.sample.ftp
password= satnam_password

echo "
 verbose
 open $IP_address
 USER $username $password
 put $1
 bye
" > ftp -n > ftp_$$.log
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:28 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0