![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Working with multiple home directories. | trey85stang | Shell Programming and Scripting | 11 | 05-15-2008 11:45 PM |
| why the below script is not working ., | konankir | Shell Programming and Scripting | 14 | 03-27-2008 01:32 PM |
| bdf script not working !! | kpatel786 | Shell Programming and Scripting | 3 | 11-16-2007 08:10 AM |
| sed: working with multiple lines | orno | Shell Programming and Scripting | 3 | 11-14-2007 03:28 AM |
| FTP script not working | rookie250 | Shell Programming and Scripting | 2 | 12-18-2006 11:49 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiple rsh in a script not working
Hi,
From one of the unix servers i want execute an rsh command to 5 different servers. i want to go to these servers execute a command and come back. i have a main program which calls a function, where in i use the rsh command. The server name is passed as a parameter to teh function. it is working fine for the first server, after that it is not executing rsh for the other servers. the structure is fun () { rsh $1 } while read line do fun $line done < server_name.txt i tried with ssh also but the same problem persists. Advance Thanks Praphul |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
can you post the complete rsh line in the function? based on the info you've give so far, my guess is your rsh line is not terminating correctly so your function cannot go to the next iteration of the loop ...
|
|
#3
|
|||
|
|||
|
the rsh command
sudo rsh <server name> cat /a/b/c/d |grep -v '*'|grep -v ' '|grep -v '#'|grep 8.1.7|cut -d ':' -f1>> ~/test
Thanks Praphul |
|
#4
|
||||
|
||||
|
can you run the rsh lines manually on the command line for each of the other servers? if not, your issue may be that the account you're using to do the rsh to the other servers is not setup properly ... check $HOME/.rhosts and/or $HOME/.ssh to make sure they are the same on all your listed servers for the account in question ...
|
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|