uzbek-plus/b12/tn.sh

3 lines
234 B
Bash

#!/bin/sh
# 480s: run board commands over telnet. tn.sh WAIT 'cmd'... (one command per arg)
W=$1; shift; { sleep 1; for c in "$@"; do printf '%s\r\n' "$c"; done; sleep $W; } | ncat 172.16.42.1 23 | tr -d "\000\r" | sed -n '/# /,$p'