Hi all.
This is my little bash-script:
cat ./q
#!/bin/bash
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4
GGG=“SSSSSSSSSSSSSSSS”
GGG= ssh $1 apcaccess | grep -i ITE | awk ‘{print $3}’
echo “[G]=$GGG”
exit
This is how use this script:
./q root@zcm0
38.2
[G]=SSSSSSSSSSSSSSSS
Problem:
string:
GGG= ssh $1 apcaccess | grep -i ITE | awk ‘{print $3}’
do not work as need.
I need have output from the command:
ssh $1 apcaccess | grep -i ITE | awk ‘{print $3}’
in the variable:
GGG
Please, help me.
Serg