printf '{"id":1,"method":"mining.subscribe","params":["c/1"]}\n{"id":2,"method":"mining.authorize","params":["1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa.check","x"]}\n' | timeout --foreground 3600 nc kilodatum.airdns.org 11010 | jq -rc --unbuffered 'select(.method=="mining.notify")|.params[5]' | { v=""; t=$(date +%s); while :; do read -r -t 10 nv; rc=$?; (( rc == 1 )) && { echo "$(date +%T) *** CONEXION CERRADA ***"; break; }; if (( rc == 0 )); then v=$nv; t=$(date +%s); n=" <- job nuevo"; else n=""; fi; [ -z "$v" ] && { echo "$(date +%T) esperando primer job..."; continue; }; a=$(( $(date +%s) - t )); (( 0x$v & 0x10 )) && s="SEÑALIZA BIP110" || s="*** NO SEÑALIZA ***"; (( a > 60 )) && w=" AVISO: sin job hace ${a}s" || w=""; echo "$(date +%T) 0x$v $s (hace ${a}s)$n$w"; done; } Replace "kilodatum.airdns.org 11010" with the pool you want to observe