#!/bin/bash 
# We require perl
[ ! -f $(which perl) ] && exit 
dev="/dev/ttyUSB0"
otp1=$(ssh root@server comgt -d "$dev" -s ./balance.comgt)
otp2=${otp1#*\"}
otp3=${otp2%\"*}
#echo $otp3
perl -e 'print pack("H*", "'$otp3'");' ; echo
