The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 08:08 AM
Simple BASH script? JayC89 Shell Programming and Scripting 16 10-02-2007 07:23 PM
Simple date and time calulation in BASH ripat Tips and Tutorials 0 10-08-2006 06:15 AM
Simple bash for loop problem kingdbag Shell Programming and Scripting 4 09-15-2006 01:00 AM
Simple Bash Script xaphalanx Shell Programming and Scripting 3 12-21-2005 03:54 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-21-2006
satnamx satnamx is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 34
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?
  #2 (permalink)  
Old 04-21-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,754
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0