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
Configuration File Harikrishna Shell Programming and Scripting 2 05-09-2008 06:49 AM
configuration file ioa_pol SUN Solaris 1 04-08-2008 06:31 PM
Extracting data from text file based on configuration set in config file suparnbector Shell Programming and Scripting 3 08-10-2007 02:25 AM
configuration of depot file. balarajum HP-UX 2 03-26-2007 08:10 AM
Configuration file? Relykk UNIX for Dummies Questions & Answers 2 03-29-2004 12:14 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-26-2007
iamcool iamcool is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 17
configuration file

i am trying to use a configuration file to FTP some files.. i am not sure how to call or use a configuration file in script.
can anybody help
  #2 (permalink)  
Old 12-26-2007
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
Do you mean a configuration file for the ftpd daemon like inetd.conf?
Or maybe /etc/ftpd/ftpaccess

What EXACTLY are you trying to do?
  #3 (permalink)  
Old 12-26-2007
iamcool iamcool is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 17
i am trying to ftp files from one server to other. i have prepared all files on server1 and I have to provide site name, user id and password in the script to FTP files to another server.
  #4 (permalink)  
Old 12-26-2007
RishiPahuja's Avatar
RishiPahuja RishiPahuja is offline
Registered User
  
 

Join Date: Apr 2005
Location: Bangalore, India
Posts: 203
One way to do this via sftp is


sftp -b $SERVER_NAME << EOF
get file1
get file2
.....
EOF

If you do not have ssh key stored between two servers it will prompt you for password. Also not that this assumes you are connecting to other server with same name where you are logged in now.
  #5 (permalink)  
Old 12-26-2007
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
For ftp in a shell script-
1. search the forums - the FAQ has many great examples
2. bare bones "here document" you can use in a shell script:

Code:
ftp -n <<EOJ
open server2
user myusername mypasswd
put myfile
bye
EOJ
  #6 (permalink)  
Old 12-27-2007
iamcool iamcool is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 17
help !!

is it EOF or EOJ.. i tried doing it and its not working !! i cannot find an example for it ..
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 01:40 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