On Mon, 2009-06-01 at 08:41 -0700, Lemseffer. Tahar (MSA) wrote:
> Morning All,
> I just want to thank Mr. Adam Augustine his help.
> Here is what I did , but did not work.
> #!/bin/csh
> $FDDI_MM_LIST='ypcat hosts | grep cnr | grep f |sort |awk "{print $2}'
> For CONCENTRATOR in $FDDI_MM_LIST
> Do 
> Echo""
> ERRORCOUNT='snmpget -v1 2c -c public $concentrator 1.3.6.1.2.1.11.4 |
> awk " "{print $4}'
> Echo "$CONCENTRATOR= $ERRORCOUNT"
> Done
> 
> The result said snmpget: not found
> 
> AM I doing something wrong.

Your first problem is that you're using csh. Friends don't let friends
use csh.

Your second problem is that your csh script is not valid csh. If this is
your first experience writing shell scripts, you should write small test
scripts to make sure you understand how to do things like set variable
or capture the output of commands.

Your third problem is most likely that snmpget is not installed. Have
you already tested each step of the script by hand to make sure it does
what you expect?

-- 
"XML is like violence: if it doesn't solve your problem, you aren't
using enough of it." - Chris Maden

--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list

Reply via email to