Skip to content

Commit

Permalink
Removing quotes from snmp result.
Browse files Browse the repository at this point in the history
  • Loading branch information
edufolly committed Apr 25, 2024
1 parent ac04c55 commit 5062278
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fi

# SNMPv2c - Get
echo "SNMPv2c - Get"
RESULT=$(snmpget -v2c -c public -Ovq "$HOST:$PORT" "$GET")
RESULT=$(snmpget -v2c -c public -Ovq "$HOST:$PORT" "$GET" | tr -d '"')

if [ "$RESULT" != "At flying circus" ]; then
echo "Error: $RESULT"
Expand Down Expand Up @@ -122,7 +122,7 @@ RESULT=$(snmpget -v3 -Ovq -u "$SNMP_V3_USER" \
-l authNoPriv \
-a "$SNMP_V3_AUTH_PROTOCOL" \
-A "$SNMP_V3_AUTH_PWD" \
"$HOST:$PORT" "$GET")
"$HOST:$PORT" "$GET" | tr -d '"')

if [ "$RESULT" != "At flying circus" ]; then
echo "Error: $RESULT"
Expand Down Expand Up @@ -189,7 +189,7 @@ RESULT=$(snmpget -v3 -Ovq -u "$SNMP_V3_USER" \
-A "$SNMP_V3_AUTH_PWD" \
-x "$SNMP_V3_PRIV_PROTOCOL" \
-X "$SNMP_V3_PRIV_PWD" \
"$HOST:$PORT" "$GET")
"$HOST:$PORT" "$GET" | tr -d '"')

if [ "$RESULT" != "At flying circus" ]; then
echo "Error: $RESULT"
Expand Down

0 comments on commit 5062278

Please sign in to comment.