10-31-2018
You should build a function that do what you want.
Then loop over the servers with a "while" or a "for" instruction and call that function.
You should also choose whether you want to hold this server list into a config file or a variable.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there a command that will return the name of the largest file within a directory? If so, can I set the returned filename into a variable? (4 Replies)
Discussion started by: joli
4 Replies
2. Shell Programming and Scripting
Hello every one,
Iam newbie to this forum and shell programming &scripting.
i needed to compare each and every folder of two separate servers.
Actually I have copied some directory structure from one server to second server, to build on second server the files all should be copied... (3 Replies)
Discussion started by: mannam srinivas
3 Replies
3. Shell Programming and Scripting
hi
ls -l * | sed 's/\+/ /g' | cut -f5 -d " " >out1
ls -l * | sed 's/\+/ /g' | cut -f5 -d " " >out2
diff out1 out2
i tried this it will work fine and i can see difference
but i need a script which should neglect, if the difference b/w files is small
and
it should display... (5 Replies)
Discussion started by: revenna
5 Replies
4. Shell Programming and Scripting
Hello,
I am working with KSH on AIX and I have 2 files generated from different sources... as seen below:
FILE1 FILE2
AAA AAA@ABS0001C
BBB BBB@ABS0003D
CCC CCC@ABS0023A
DDD DDD@ABC0145D
EEE EEE@ABS0090A
FFF FFF@ABS0002A
GGG GGG@ABC0150D
HHH
FILE1 is main main data source,... (4 Replies)
Discussion started by: right_coaster
4 Replies
5. HP-UX
I need to get a file size and compare it to a previous day file size. If it's larger or smaller by 50 percent I'll replace the new with the old. I know how to get the file sizes but do not know how to calculate if it's 50 percent difference.
Thanks for your help. (2 Replies)
Discussion started by: jkuchar747
2 Replies
6. UNIX for Dummies Questions & Answers
Hi everyone!
I need to compare two file sizes.
One of them (size) will be stored in a flat file and the other coming from a listed file.
I can now get the first file size using:
SIZE=`ls -l $DOCTYPE | awk '{print $5}'`
1. How can I store this value in a flat file?
2. How... (2 Replies)
Discussion started by: mrreds
2 Replies
7. Shell Programming and Scripting
I need to write a bash script larger X Y that compares the sizes of two specified files X and Y,
and reports which file is larger. For example, if X is larger, the output should be "File X is larger",
while if Y is larger, the output should be "File Y is larger".
If the files are exactly the... (3 Replies)
Discussion started by: julia_21436
3 Replies
8. Shell Programming and Scripting
Hello,
I have an output file showing database sizes across the 3 environments that I use (LIVE, TEST & DEVELOPMENT).
I am trying to write a script that lets me know if the size of a db on one environment is different to its corresponding db on the other environments.
Here is an example... (4 Replies)
Discussion started by: stevie_g
4 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am running a script that connets to a list of servers with SSH and runs a command but I have some servers that are asking for password (authorized keys is not configured properly).
Is there any way to do so that if I get a prompt for password just skip that entry?
my script:
... (1 Reply)
Discussion started by: galuzan
1 Replies
10. Shell Programming and Scripting
Hi,
I created a skript in ksh which generate a file with semicolon as separator, this is an example of the file a created:
example content file:
hello;AAAA;2014-08-17
hello;BBBB;2014-08-17
hello;CCCC;2014-08-17
I would need to compare the content in of the second column of this file... (3 Replies)
Discussion started by: jmartin
3 Replies
LEARN ABOUT DEBIAN
xpainfo
xpainfo(3) SAORD Documentation xpainfo(3)
NAME
XPAInfo - send short message to one or more XPA servers
SYNOPSIS
#include <xpa.h>
int XPAInfo(XPA xpa,
char *template, char *paramlist, char *mode,
char **names, char **messages, int n);
DESCRIPTION
Send a short paramlist message to one or more XPA servers whose class:name identifier matches the specified template.
A template of the form "class1:name1" is sent to the XPA name server, which returns a list of at most n matching XPA servers. A connection
is established with each of these servers and the paramlist string is passed to the server as the data transfer request is initiated. If an
XPA struct is passed to the call, then the persistent connections are updated as described above. Otherwise, temporary connections are made
to the servers (which will be closed when the call completes).
The XPAInfo() routine does not send data from a buf to the XPA servers. Only the paramlist is sent. The semantics of the paramlist is not
formalized, but at a minimum is should tell the server how to get more information. For example, it might contain the class:name of the
XPA access point from which the server (acting as a client) can obtain more info using XPAGet.
A string containing the class:name and ip:port of each server is returned in the name array. If a given server returned an error or the
server callback sends a message back to the client, then the message will be stored in the associated element of the messages array. The
returned message string will be of the form:
XPA$ERROR error-message (class:name ip:port)
or
XPA$MESSAGE message (class:name ip:port)
The return value will contain the actual number of servers that were processed. This value thus will hold the number of valid entries in
the names and messages arrays, and can be used to loop through these arrays. In names and/or messages is NULL, no information is passed
back in that array.
The following keywords are recognized:
key value default explanation
------ -------- -------- -----------
ack true/false true if false, don't wait for ack from server
When ack is false, XPAInfo() will not wait for an error return from the XPA server. This means, in effect, that XPAInfo will send its
paramlist string to the XPA server and then exit: no information will be sent from the server to the client. This UDP-like behavior is
essential to avoid race conditions in cases where XPA servers are sending info messages to other servers. If two servers try to send each
other an info message at the same time and then wait for an ack, a race condition will result and one or both will time out.
Example -
(void)XPAInfo(NULL, "IMAGE", "ds9 image", NULL, NULL, NULL, 0);
SEE ALSO
See xpa(7) for a list of XPA help pages
version 2.1.14 June 7, 2012 xpainfo(3)