![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scripting help | tiney83 | UNIX for Dummies Questions & Answers | 4 | 05-14-2008 09:04 PM |
| sql scripting help | sam786 | Shell Programming and Scripting | 3 | 12-10-2007 12:31 PM |
| difference between AIX shell scripting and Unix shell scripting. | haroonec | Shell Programming and Scripting | 2 | 04-12-2006 09:12 AM |
| scripting guru's pls help me with scripting on AIX | thatiprashant | Shell Programming and Scripting | 1 | 01-20-2006 07:58 PM |
| New to scripting | sdrtaz | Shell Programming and Scripting | 2 | 03-18-2005 03:22 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
ssh scripting
Hi,
I'm trying to write a script that will ssh into a number of boxes and run 'top' and 'ps', then output the results to a file with the hostname. The script only seems to run top or ps on the local machine though. Any help would be apperciated Code:
#ssh into box
while read box
do ssh -n $box -l $username;
./runaway;
done < "boxes.txt"
#runaway is a separate file but here it is
#ps -Aalf> test.txt
echo `hostname` >> test.txt
top -b -d 3 -n 1 >> test.txt
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|