[PLUG] shell scripting

russj at dimstar.net russj at dimstar.net
Wed Oct 21 21:18:47 UTC 2009


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)" <lemseffert at sacsewer.com>
Date: Wed, 21 Oct 2009 14:00:02 
To: <jgw at freeshell.org>; General Linux/UNIX discussion and help;civil and on-topic<plug at lists.pdxlinux.org>
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: plug-bounces at lists.pdxlinux.org
[mailto:plug-bounces at lists.pdxlinux.org] On Behalf Of jgw at freeshell.org
Sent: Wednesday, October 21, 2009 12:30 PM
To: plug at lists.pdxlinux.org
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
PLUG at lists.pdxlinux.org
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
PLUG at lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


More information about the PLUG mailing list