Sponsored Content
Full Discussion: Multiple FTP.
Top Forums Shell Programming and Scripting Multiple FTP. Post 302353386 by clx on Tuesday 15th of September 2009 08:29:41 AM
Old 09-15-2009
you can make a file like :


in the script:

while read LINE
host=$(echo "$LINE" | awk -F";" '{print $1}')
user=$(echo "$LINE" | awk -F";" '{print $2}')
pass=$(echo "$LINE" | awk -F";" '{print $3}')
echo "host is $host"
echo "user is $user"
echo "pass is $pass"
## do whatever you want on each host 

done < myfile


10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ftp to multiple servers

Hi folks. I am writing a ksh ftp script. The problem is, I need to transfer the files to several different servers. Is there a way to close a connection and move on to the next in one script or do I need to write a separate script for each one? Thanks, kristy (2 Replies)
Discussion started by: kristy
2 Replies

2. Shell Programming and Scripting

Need to send multiple files during ftp

Hi guys... I'm working on #!/bin/sh script in a Solaris 7 box that should send several files over to another machine via FTP. Here's what the script looks like: # This script will send the daily MSP customer counts # to the Crystal Reports server located at cd... (2 Replies)
Discussion started by: cdunavent
2 Replies

3. HP-UX

how to ftp multiple files

Hi, I have to write a ftp script which transfers multiple files from one unix server to another. When I try to transfer single file it goes through successfully. But, When I try to do multiple files none of the files get ftp'd. And also, even the single file goes transferred successfully, I... (4 Replies)
Discussion started by: isingh786
4 Replies

4. IP Networking

Automated ftp for Multiple files

I have seen the script posted yesterday for automated ftp Can we do some thing like ftp ing multiple files in one script Example input.txt has all files names to be ftped input.txt ------ a.tar b.ccp c.perl i need to ftp all the files present in input.txt i tried something like... (0 Replies)
Discussion started by: pbsrinivas
0 Replies

5. Shell Programming and Scripting

Help in FTP'ing multiple files

Hi, I have written the following FTP script to get the multiple files from remote server to local server. My problem is that 'mget *' is not working in the script. I also tried with 'mget *.txt', 'mget *.*' etc. without any success. It do not copy any file to local server. In the script, Prompt... (10 Replies)
Discussion started by: berlin_germany
10 Replies

6. Shell Programming and Scripting

ftp multiple files from same directory

Hi there Gurus, I have the following ftp script: $ more ftp_dump_arch4.sh #! /usr/bin/ksh # Constant variables HOST='xx.xx.xx.xx' USER='user' PASSWD='password' dir='/export/file' ftp_log='/tmp' ftp -n $HOST > $ftp_log/ftp.log << END user $USER $PASSWD verbose lcd $dir bin (3 Replies)
Discussion started by: lweegp
3 Replies

7. Shell Programming and Scripting

Automated FTP script using .netrc to multiple FTP servers

Hi all, I'm using the following script to automated ftp files to 1 ftp servers host= /usr/bin/ftp -vi >> $bkplog 2>&1 <<ftp open $host bin cd ${directory} put $files quit ftp and the .netrc file contain machine login abc... (4 Replies)
Discussion started by: varu0612
4 Replies

8. Shell Programming and Scripting

FTP multiple files from multiple directories

I have multiple files that starts as TRADE_LOG spread across multiple folders in the given structure.. ./dir1/1/TRADE_LOG*.gz ./dir2/10/TRADE_LOG*.gz ./dir11/12/TRADE_LOG*.gz ./dir12/13/TRADE_LOG*.gz when I do ftp uisng mput from the "." dir I am getting the below given error mput... (1 Reply)
Discussion started by: prasperl
1 Replies

9. Windows & DOS: Issues & Discussions

Script to ftp in to multiple ip addresses

Hello Is there an easy way to login to various ip's..one after the other. I need to login to about 30 aix boxes and put a file in each one... Cheers (1 Reply)
Discussion started by: Grueben
1 Replies

10. Shell Programming and Scripting

Ftp multiple files one at a time

Hi, I have a problem while ftp'ing zip files one after the other from linux source directory to a ftp host machine. here is the shell script: #!/bin/ksh dir=data/dir1/dir2 # this dir is linux source directory where zip files located. rmtdir='/home/' echo $dir for i in /$dir/*; do if ;... (7 Replies)
Discussion started by: raj78
7 Replies

MessageFormatter::getPattern - Get the pattern used by the formatter

	Object oriented style

public string MessageFormatter::getPattern (void ) DESCRIPTION
Procedural style string msgfmt_get_pattern (MessageFormatter $fmt) Get the pattern used by the formatter PARAMETERS
o $fmt - The message formatter RETURN VALUES
The pattern string for this message formatter EXAMPLES
Example #1 msgfmt_get_pattern(3) example <?php $fmt = msgfmt_create( "en_US", "{0, number} monkeys on {1, number} trees" ); echo "Default pattern: '" . msgfmt_get_pattern( $fmt ) . "' "; echo "Formatting result: " . msgfmt_format( $fmt, array(123, 456) ) . " "; msgfmt_set_pattern( $fmt, "{0, number} trees hosting {1, number} monkeys" ); echo "New pattern: '" . msgfmt_get_pattern( $fmt ) . "' "; echo "Formatted number: " . msgfmt_format( $fmt, array(123, 456) ) . " "; ?> Example #2 OO example <?php $fmt = new MessageFormatter( "en_US", "{0, number} monkeys on {1, number} trees" ); echo "Default pattern: '" . $fmt->getPattern() . "' "; echo "Formatting result: " . $fmt->format(array(123, 456)) . " "; $fmt->setPattern("{0, number} trees hosting {1, number} monkeys" ); echo "New pattern: '" . $fmt->getPattern() . "' "; echo "Formatted number: " . $fmt->format(array(123, 456)) . " "; ?> The above example will output: Default pattern: '{0,number} monkeys on {1,number} trees' Formatting result: 123 monkeys on 456 trees New pattern: '{0,number} trees hosting {1,number} monkeys' Formatted number: 123 trees hosting 456 monkeys SEE ALSO
msgfmt_create(3), msgfmt_set_pattern(3). PHP Documentation Group MSGFMT_GET_PATTERN(3)

Featured Tech Videos

All times are GMT -4. The time now is 07:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy