Aren't you changing the devices variable in the middle of the loop?
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "Lemseffer. Tahar  (MSA)" <[email protected]>
Date: Wed, 21 Oct 2009 14:00:02 
To: <[email protected]>; General Linux/UNIX discussion and help;civil and 
on-topic<[email protected]>
Subject: [PLUG] shell scripting

hello all,

i want to Perform an SNMP set request in SNMP agent. return 0 if the
connect succeeded.

here is what i did :

LIST = 'ypcat hosts|| sort | awk '{print $2}''
for Devices in $LIST
do
Errorcount=`snmpget -v1 -c privator $Devices snmpInBadCommunityNames.O
|awk '{print $4}' `
if [ Errorcount > 0 ]; then
Devices=$Errorcount
echo $Devices
# line added
echo "$sysdate $Devices" >> /tmp/hosthistory.txt

fi
done

but the answer is wrong cause i'm getting an errorcount.

Thank you All


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of [email protected]
Sent: Wednesday, October 21, 2009 12:30 PM
To: [email protected]
Subject: Re: [PLUG] PLUG AT talk this Thursday?

Michael Dexter wrote:

> > Michael> What are people's thoughts about a NetBSD Xen walk through
on
> > Michael> Thursday from 7PM - 9PM at Club 915 at 915 SW 2nd?
> > ...
> 
> Would anyone want THIS topic THIS Thursday?

I would.  Is this still happening?

Jeff W
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug
____________________________________________________________________________
EMAIL DISCLAIMER:
This email and any attachments thereto may contain private, confidential, and
privileged material for the sole use of the intended recipient. Any review,
copying, or distribution of this email (or any attachments thereto) by other
than the intended recipient is strictly prohibited.

If you are not the intended recipient, please contact the sender immediately
and permanently delete the original and any copies of this email and any
attachments thereto.
_____________________________________________________________________________

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to