========================= script ========================= #!/bin/bash time=600 members=`asterisk -rx "queue show 1" | grep -a Local | sed 's/^[ \t]*//'| cut -d" " -f 1,10` echo "Noop $members" #for i in $members; do if (( "${members:10}" >= "${time}" )); then echo "overtime" fi ============================ output =========================== [root@localhost home]# bash -x ./agent-logoff.sh + $'\rtime=600' time=600: command not found ++ asterisk -rx 'queue show 1' ++ grep -a Local ++ sed 's/^[ \t]*//' ++ cut '-d ' -f 1,10 ' members='Local/555 7333 ' echo 'Noop Local/555 7333 Noop Local/555 7333 >= ))33 ./agent-logoff.sh: line 10: /usr/share/locale/en_US.UTF-8.utf8/LC_MESSAGES/bash. >= : syntax error: operand expected (error token is ">= ")