Sponsored Content
Full Discussion: ftp to multiple servers
Top Forums Shell Programming and Scripting ftp to multiple servers Post 11343 by kristy on Monday 3rd of December 2001 02:49:17 PM
Old 12-03-2001
aha

Thanks for the suggestion, PxT. I think I solved this another way by using the variable $1 for hostname and then writing another script that provides the hostnames like this:

#!/bin/ksh

cd DIR

./ftpscript host1
./ftpscript host2
./ftpscript host3
./ftpscript host4

-kristy
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

rsh to change multiple ip in multiple servers?

good day. i jsut wanted to know what is the best script or the best way changing a lot of Ip's in all servers. Do you have any idea? im using awk to change IP,what if, you have lots of servers. You need to change it one by one? It will take time to change it manually. (2 Replies)
Discussion started by: kenshinhimura
2 Replies

2. Shell Programming and Scripting

FTP between two UNIX servers

Hi I have server A and server B. On server B the directory is called /tmp/hmp On server A I want to get the files on server B:/tmp/hmp via FTP. After I have got the files via FTP I have to delete them. In the script below I'm affraid of that I delete files before I get them by ftp. ... (1 Reply)
Discussion started by: hpedersen4
1 Replies

3. Shell Programming and Scripting

Script ftp multiple servers

Hi guys , i have 1 problem and no find what is the problem...:confused:, and .netrc is configured and correct permissions... REMOTE="/home/user" LISTADO=`cat /root/home/user/LISTADO.txt` MACHINE=$(echo $i|awk 'FS="|" {print $1}') for i in $LISTADO do ftp $MACHINE <<TER passive prompt... (2 Replies)
Discussion started by: Esquizo000
2 Replies

4. 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=192.168.0.1 /usr/bin/ftp -vi >> $bkplog 2>&1 <<ftp open $host bin cd ${directory} put $files quit ftp and the .netrc file contain machine 192.168.0.1 login abc... (4 Replies)
Discussion started by: varu0612
4 Replies

5. UNIX for Advanced & Expert Users

Help Me - How to grep in multiple servers

Hi All, I need help , Regarding the keyword search in multiple servers at a time . we are desiging a search website . we have a multiple servers and each of the server have 3 instances having Unix compressed files.Our requirement was we need to search the particular key word for eg. we need to... (7 Replies)
Discussion started by: prasad00124
7 Replies

6. Shell Programming and Scripting

FTP files modified after a particular date between servers

Hi all, i need to write a shell script to transfer a file modified after a particular date from one server to another. I searched for the related posts in this forum and got hints and snippets for it. i tried the below code ftp serverA user uname pwd lcd to_dir cd from_dir files=$(find... (7 Replies)
Discussion started by: mick_000
7 Replies

7. Red Hat

RHEL 6 plain telnet & ftp servers

I am being pushed from AIX onto RHEL 6 and after our first 'chuck it on' install, I have a problem. Where is the old (okay insecure) telnet & ftp server? I know that they are probably regarded as archaic now, but the source servers do not have the SSH tools, so I've got to somehow transfer the... (4 Replies)
Discussion started by: rbatte1
4 Replies

8. IP Networking

Ftp connectivity between two UNIX servers

Hi All I am having issues using ftp between a solaris 10 server to a HP-UX 11.31 server, but from the solaris server to the hp-ux I am able to ping. This is what I have done so far: in the solaris server: root@MPCRS01 # svcs -a | grep ftp online Jul_26 svc:/network/ftp:default... (12 Replies)
Discussion started by: fretagi
12 Replies

9. UNIX for Beginners Questions & Answers

ssh multiple servers

Hi folks. I'm pretty new to unix, while I'm learning a lot I'm finding bash scripting quite confusing. Im sure it's not really, my head just hasn't clicked with it. Anyway, I need a script to loop the ip addresses stored in a file and run a "pgrep <process>" and return the pid or some... (2 Replies)
Discussion started by: MuntyScrunt
2 Replies

10. UNIX for Beginners Questions & Answers

How to apply the update statement in multiple servers on multiple dbs at a time .?

Hi , Can any please help the below requirement on all multiple servers and multiple dbs. update configuration set value='yes' ;1) the above statement apply on 31 Databases at a time on different Ip address eg : 10.104.1.12 (unix ip address ) the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies
Permute(3pm)						User Contributed Perl Documentation					      Permute(3pm)

NAME
String::Glob::Permute - Expand {foo,bar,baz}[2-4] style string globs SYNOPSIS
use String::Glob::Permute qw( string_glob_permute ); my $pattern = "host{foo,bar,baz}[2-4]"; for my $host (string_glob_permute( $pattern )) { print "$host "; } # hostfoo2 # hostbar2 # hostbaz2 # hostfoo3 # hostbar3 # hostbaz3 # hostfoo4 # hostbar4 # hostbaz4 DESCRIPTION
The "string_glob_permute()" function provided by this module expands glob-like notations in text strings and returns all possible permutations. For example, to run a script on hosts host1, host2, and host3, you might write @hosts = string_glob_permute( "host[1-3]" ); and get a list of hosts back: ("host1", "host2", "host3"). Ranges with gaps are also supported, just separate the blocks by commas: @hosts = string_glob_permute( "host[1-3,5,9]" ); will return ("host1", "host2", "host3", "host5", "host9"). And, finally, using curly brackets and comma-separated lists of strings, as in @hosts = string_glob_permute( "host{dev,stag,prod}" ); you'll get permutations with each of the alternatives back: ("hostdev", "hoststag", "hostprod") back. All of the above can be combined, so my @hosts = string_glob_permute( "host{dev,stag}[3-4]" ); will result in the permutation ("hostdev3", "hoststag3", "hostdev4", "hoststag4"). The patterns allow numerical ranges only [1-3], no string ranges like [a-z]. Pattern must not contain blanks. The function returns a list of string permutations on success and "undef" in case of an error. A warning is also issued if the pattern cannot be recognized. Zero padding An expression like @hosts = string_glob_permute( "host[8-9,10]" ); # ("host8", "host9", "host10") will expand to ("host8", "host9", "host10"), featuring no zero-padding to create equal-length entries. If you want ("host08", "host09", "host10"), instead, pad all integers in the range expression accordingly: @hosts = string_glob_permute( "host[08-09,10]" ); # ("host08", "host09", "host10") Note on Perl's internal Glob Permutations Note that there's a little-known feature within Perl itself that does something similar, for example print "$_ " for < foo{bar,baz} >; will print foobar foobaz if there is no file in the current directory that matches that pattern. String::Glob::Permute, on the other hand, expands irrespective of matching files, by simply always returning all possible permutations. It's also worth noting that Perl's internal Glob Permutation does not support String::Glob::Permute's [m,n] or [m-n] syntax. COPYRIGHT &; LICENSE Copyright (c) 2008 Yahoo! Inc. All rights reserved. The copyrights to the contents of this file are licensed under the Perl Artistic License (ver. 15 Aug 1997). AUTHOR
Algorithm, Code: Rick Reed, Ryan Hamilton, Greg Olszewski. Module: 2008, Mike Schilli <cpan@perlmeister.com> perl v5.12.4 2009-01-29 Permute(3pm)
All times are GMT -4. The time now is 10:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy