1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/sh case `uname` in SunOS) awk=nawk ;; *) awk=awk ;; esac label() { echo "$@" | $awk '{printf("\033];%s\007", $0);}' >/dev/tty } label "$@"