#!/bin/sh # 480s side: run one b9b-test.sh / shell command on the board over telnet and append the output to logs/b9/b9b/ramK/steps.txt. # usage: b9b-cmd.sh K WAIT_S 'command' K=$1; W=$2; C=$3; cd ~/doc/modem/jz08-aurora; O=logs/b9/b9b/ram$K; mkdir -p $O { echo "=== $(date -u +%H:%M:%S) \$ $C"; { sleep 1; printf '%s\r\n' "$C"; sleep $W; } | ncat 172.16.42.1 23 | tr -d "\000\r" | sed '1,/\$ \|# /{/^~ #\|^\s*$/d}'; } | tee -a $O/steps.txt