Bash script to parse Output
Hello All,
This is my code , Code:
#!/bin/bash For this I am getting output similar to this, Quote:
I am trying to modify the code to display like, Quote:
Could someone guide me what needs to be added in code to achieve above result? |
Code:
Output=$(snmpwalk -m /usr/share/snmp/mibs/CISCO-UNIFIED-COMPUTING-STORAGE-MIB.my -v2c -c opennms-Priv x.x.x.x .1.3.6.1.4.1.9.9.719.1.45.4.1.18 2>/dev/null | awk '{print $4}' | let i=1; while read -r line ; do echo "Drive $i:$line"; ((i++)); done) |
Thats exactly what i was expecting. Thanks for the quick help. I appreciate it.
|
All times are GMT -5. The time now is 02:29 PM. |