03-07-2011
Hi Corona,
THANK YOU SO MUCH ..
I finally got it working ..
Here is what i was trying to do ..
ssh-agent , ssh add was creating whole lot of issues ..
I initially thought of puting the servers in a loop call them one by one and execute commands cylicly on all the servers..
Did not have any idea of backquote etc etc ..
I was also wrong to be using pipes when i tried two commands with no relation what so ever... Then I learned the o/p of first command will be the input of another .. Yup I relatively new to Unix too :-) ..
HARNESS_SCRIPT_GREATNESS="255.255.255.255"
###################################################
for host in $HARNESS_SCRIPT_GREATNESS
do
echo ------------------------------------------
echo $host
##################################################
ssh -t $host 'eval `ssh-agent`;ssh-add;cd /x/y/z/; svn checkout svn+ssh://a/b/c/d';something else ; something else ; something else;
echo ------------------------------------------
done
xytiz
---------- Post updated at 09:48 PM ---------- Previous update was at 06:02 PM ----------
Hi Corona,
I am getting slightly greedy with what my script can do here. So the situation is .
I am trying to run a upgrade script I know the exact folderstructure and the extension of the file (.rpm). But I do not know the file name and There will be only 1 file with .rpm extension in the folder I am interested.
So can i get the file name assigned to a variable ?
sudo rpm -Uvh /a/b/c/d/*.rpm < THIS DOES NOT WORK
sudo rpm -UVH /a/b/c/d/${}.rmp < What should I put in the braces ?
Thanks for your time
xytiz
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi
Is there any shell script that accesses multiple linux servers to get details such as CPU usage, RAM used etc. The access of the servers must be parallel not serial in the sense it must ping all the servers at a time to get information.The script has to be triggered from a host system and get... (7 Replies)
Discussion started by: mssrivatsa
7 Replies
2. Shell Programming and Scripting
Requirement:
Run a shell script with below inputs
file name
checksum
path
the script should go to multiple servers (around 35) and verify the input cksum and if there is a mismatch display a simple message to the user that cksum verification failed.
host details, user id /... (1 Reply)
Discussion started by: amicableperson
1 Replies
3. Shell Programming and Scripting
Can any one please let me know the shell script to change the password for a particular user on multiple linux servers. (2 Replies)
Discussion started by: s_madras
2 Replies
4. Shell Programming and Scripting
Hello,
I have access to several linux servers (mostly centos based) located in a DC in another country.
from day to day I need to login to each of them to do some work (they dont have gui/window manager installed, I work only from console), or even to just do a check like df -h for disc usage.... (3 Replies)
Discussion started by: MaRiOsGR
3 Replies
5. Shell Programming and Scripting
Hi,
I am trying to write a script to run a command on multiple linux based servers and get the o/p. I am using ssh to login. It is a celerra box and EMC NAS product.
I am able login but i am not able to run nas command nas_pool -size -all the NAS server. I am getting the following error. ... (2 Replies)
Discussion started by: jpkumar10
2 Replies
6. Shell Programming and Scripting
Hi Experts,
I am new to scripting. We have around 400 Linux servers in our environment. I want to add a new user to a perticular group on all the servers using SSH.
Requirements:
1) Need to take the server names from a text file.
2) Login into each server and check whether perticular... (1 Reply)
Discussion started by: Satya1983
1 Replies
7. Shell Programming and Scripting
Hi
I have an ssh 'for' loop script to login and put a key on multiple servers. I need to append a file on each server but the command which works ok from the prompt does not work via the script. I have
cat filename | ssh user@servername "cat >>append.file.name"
I have tried to 'spawn' this in... (0 Replies)
Discussion started by: Grueben
0 Replies
8. Shell Programming and Scripting
Hi All,
How can i run a single command on multiple servers with or without giving credentials.
I have a file(servers.txt) which has got list of servers and i want to run a command lsb_release -dr on all these servers and get output of those servers against each server.
I tried below code... (9 Replies)
Discussion started by: darling
9 Replies
9. UNIX for Beginners Questions & Answers
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. Shell Programming and Scripting
Hi,
I am trying to complete my bash script in order to find which SSH servers on LAN are still active with the ssh keys, but i am frozen at this step:
#!/bin/bash
# LAN SSH KEYS DISCOVERY SCRIPT
</etc/passwd \
grep /bin/bash |
cut -d: -f6 |
sudo xargs -i -- sh -c '
&& cat... (11 Replies)
Discussion started by: syrius
11 Replies