Thanks for your suggestions steps, I followed your steps (I have given the heredoc <<EOF). It has executed successfully for first server only. After all the commands are executed in first server, the loop is going to end. The server_list file is like below,
cat server_list
server1
server2
server3
.....
.....
...
.
Is this file having any changes?
or
Is the loop statement having any changes?
I need to login into multiple servers thru a script run couple commands and run find command as root. I only have ssh access to the servers as a user than I can "su" to root. If you have a similar script please post it. Also if you can suggest commands that I should consider please let me know.
... (1 Reply)
Hi,
I want to write a shell script to compare two tables in teradata.these tables are present on different servers.
I want to connect to both servers in single login in order to fetch and compare the data in one go.
Thanks (1 Reply)
I have the following block from a script (it's not the entire script, but I'm confident it's all that is pertinent)
echo "$SESSIONS"|while read ID;do
ASSETID=$(echo "$ERRORS"|grep -i "$ID"|grep FX_Media_Session_Playlist::init_playlist|grep -i asset_id=|awk '{print $11}')
BLADE=$(echo... (2 Replies)
Hi ppl,
I am looking out for a shell script
a. That would have to login(from a main server) to say 16 servers individually.
b.On each server go to a particular location, check if a particular file is generated on a date(say every sunday it gets generated and i would be interested in the latest... (0 Replies)
Hi ppl,
I am looking out for a shell script
a. That would have to login(from a main server) to say 16 servers individually.
b.On each server go to a particular location, check if a particular file is generated on a date(say every sunday it gets generated and i would be interested in the latest... (1 Reply)
Hi ppl,
I am looking out for a shell script
a. That would have to login(from a main server) to say 16 servers individually.
b.On each server go to a particular location, check if a particular file is generated on a date(say every sunday it gets generated and i would be interested in the latest... (8 Replies)
I am having the 15 servers which need to do the monitoring
Hi I need a shell script, By which i can log in to multiple servers and execute the commands.. I need to specify the username and password in the scripts.
Please help me to write the script so that it can login with username and... (5 Replies)
Hi all,
I am baffled on this. Solaris Irix system.:confused:
I have 4 servers all connected to one another, :b: I need to write a script line that would login on to server 1-3 ($HOST) start a script in the back ground and log off while the back ground script runs over a length of time.:eek:
... (10 Replies)
I need to run a script on a bunch of remote servers. how can this be done without ssh into each individual server and run it
its under /sbin/script.sh on each server (1 Reply)
I need to manually interactively feed in my password for each server one after the other. Below is the script I am using:
#!/bin/bash
input="serverlist.txt"
while IFS= read -r var <&3
do
echo $var
ssh user1@$var
done 3< "$input"
I get password prompt for the first server. If I dont have... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT DEBIAN
math::gradient
Gradient(3pm) User Contributed Perl Documentation Gradient(3pm)NAME
Math::Gradient - Perl extension for calculating gradients for colour transitions, etc.
SYNOPSIS
use Math::Gradient qw(multi_gradient);
# make a 100-point colour palette to smothly transition between 6 RGB values
my(@hot_spots) = ([ 0, 255, 0 ], [ 255, 255, 0 ], [ 127, 127, 127 ], [ 0, 0, 255 ], [ 127, 0, 0 ], [ 255, 255, 255 ]);
my(@gradient) = multi_array_gradient(100, @hot_spots);
DESCRIPTION
Math::Gradient is used to calculate smooth transitions between numerical values (also known as a "Gradient"). I wrote this module mainly to
mix colours, but it probably has several other applications. Methods are supported to handle both basic and multiple-point gradients, both
with scalars and arrays.
FUNCTIONS
gradient($start_value, $end_value, $steps)
This function will return an array of evenly distributed values between $start_value and $end_value. All three values supplied should
be numeric. $steps should be the number of steps that should occur between the two points; for instance, gradient(0, 10, 4) would
return the array (2, 4, 6, 8); the 4 evenly-distributed steps necessary to get from 0 to 10, whereas gradient(0, 1, 3) would return
(0.25, 0.5, 0.75). This is the basest function in the Math::Gradient module and isn't very exciting, but all of the other functions
below derive their work from it.
array_gradient($start_value, $end_value, $steps)
While gradient() takes numeric values for $start_value and $end_value, array_gradient() takes arrayrefs instead. The arrays supplied
are expected to be lists of numerical values, and all of the arrays should contain the same number of elements. array_gradient() will
return a list of arrayrefs signifying the gradient of all values on the lists $start_value and $end_value.
For example, calling array_gradient([ 0, 100, 2 ], [ 100, 50, 70], 3) would return: ([ 25, 87.5, 19 ], [ 50, 75, 36 ], [ 75, 62.5, 53
]).
multi_gradient($steps, @values)
multi_gradient() calculates multiple gradients at once, returning one list that is an even transition between all points, with the
values supplied interpolated evenly within the list. If $steps is less than the number of entries in the list @values, items are
deleted from @values instead.
For example, calling multi_gradient(10, 0, 100, 50) would return: (0, 25, 50, 75, 100, 90, 80, 70, 60, 50)
multi_array_gradient($steps, @values)
multi_array_gradient() is the same as multi_gradient, except that it works on arrayrefs instead of scalars (like array_gradient() is to
gradient()).
AUTHOR
Tyler MacDonald, <japh@crackerjack.net>
COPYRIGHT AND LICENSE
Copyright 2003 by Tyler MacDonald
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2010-03-12 Gradient(3pm)