Script Question
i'm just on a script wich queries with snmpget aund i get the full string like this back:
"enterprises.231.2.10.2.2.5.4.10.1.6.4 = 1073741824" now my question is how can i take only the number after the "=" sign ? i dont want to make a temporary text file and sed the unwanted things out it would be perfect if someone could tell me how i can pipe the string after the equals into a new Variable... plz help |
Into a variable? Ok. I'll show you, but I don't know what snmpget is so I just use the echo command as an example.
Code:
MYNUM=`echo "enterprises.231.2.10.2.2.5.4.10.1.6.4 = 1073741824" |awk '{ print $3 }'` |
perfect ! it works .... jiiihaaaa thanks
:D |
All times are GMT -5. The time now is 05:37 PM. |