title: Snmpwalk Linux Bash doesn't return an array
body: <p>I am running a nagios server on opensuse linux linking via snmp to an esx 3.5 server</p>
  
  <p>I am trying to get snmpwalk to return an array but it only returns a single value.</p>
  
  <p>On the esx box I ahve the following shell to find the sizes of all of the snapshots-</p>
  
  <pre><code>/usr/bin/find /vmfs/volumes/ -name '*delta*.vmdk' -printf %f' '%s'\n' 
  </code></pre>
  
  <p>This returns the following when ran on the esx box-</p>
  
  <pre><code>[root@localhost root]# /bin/sh /etc/snmp/snmp_snapshots.sh
  testnag01-000001-delta.vmdk 16840704
  testnag01-000002-delta.vmdk 167835648
  testnag01-000003-delta.vmdk 151058432
  </code></pre>
  
  <p>On the nagios box I have the following shell-</p>
  
  <pre><code>declare -a RESULT=$(/usr/bin/snmpwalk -v 2c -c public 10.10.0.20 .1.3.6.1.4.1.6876.57.101.2 | grep vmdk | awk {' print $4,$5 '} | sed 's/ /_size:/g' | sed 's/\"//g')
  
  echo "snapshot 1" ${RESULT[0]}
  echo "snapshot 2" ${RESULT[1]}
  </code></pre>
  
  <p>This only returns a single value, (the second one on the list)-</p>
  
  <pre><code>snapshot 1 testnag01-000002-delta.vmdk:167835648
  snapshot 2
  </code></pre>
  
  <p>When I run the command on its own-</p>
  
  <pre><code>/usr/bin/snmpwalk -v 2c -c public 10.10.0.20 .1.3.6.1.4.1.6876.57.101.2
  </code></pre>
  
  <p>I get the following return-</p>
  
  <pre><code>SNMPv2-SMI::enterprises.6876.57.101.2 = STRING: "testnag01-000002-delta.vmdk 167835648"
  </code></pre>
  
  <p>So it looks like the command itself is failing to return more than one result?</p>
  
  <p>I'm a noob here so I could very well be missing something obvious...</p>
  
  <p>Thanks in advance</p>