![]() |
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 |
| If statement - How to write a null statement | april | Shell Programming and Scripting | 3 | 04-16-2008 01:14 PM |
| Untar remotely | jwzumwalt | Shell Programming and Scripting | 3 | 03-19-2008 03:11 PM |
| how to use cvs export remotely | jasongr | Shell Programming and Scripting | 2 | 11-27-2005 08:41 PM |
| Having PROM Env remotely ! | nikk | UNIX for Advanced & Expert Users | 1 | 11-11-2001 03:19 PM |
| Remotely login to one from another? | Kagor | UNIX for Dummies Questions & Answers | 2 | 01-17-2001 06:39 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
if statement remotely
I need to rsh to many machines and run an " if statement' that checks the versions of the OS and if up to date it tee -a to a file called "uptodate"..then if not update, it tee -a to file called "notuptodate" on my machine
the command that checks the version is cat /etc/version. now the output of that is the one I am looking to have the if statement test against. I am just having issues with setting up that if statement This is part of it..( variable are already set up ) for host in `cat $SUN` do rsh $host "( /usr/bin/cat /etc/version)" ***problem starts here** if [$? = 5.8]; then echo $host | tee -a $uptodate else echo $host | tee -a $notuptodate fi done Your help would be appreciated |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|