[Chapter 42] 42.7 termtest: Send Repeated Characters to Terminal
Author: Jerry Peek, Tim O'Reilly & Mike Loukides
Date: 1998-08-04T21:52:35Z

#

| Chapter 42 Problems with Terminals |

## 42.7 termtest: Send Repeated Characters to Terminal

This script uses the yes (23.4) command to send 79-character lines of columns to the terminal over and over, as fast as possible. It's been useful for me when I'm looking for dropped characters, dialup noise, and other problems on a terminal or connection. The -b (blanks) option sends a screen full of space characters with an asterisk (`*`) in column 77-watching this column is an easy way to look for added or dropped characters without distractions. Use your interrupt key (5.9) (like CTRL-c) to kill the script when you're done.

The two yes command lines that follow have been broken into two pieces for printing. You should enter them all on one line.

    exec
    #! /bin/sh
    # USE yes PROGRAM TO PRINT CHARACTER STRINGS FOREVER:
    case "$1" in
    "") exec yes '()*+,-./ 01234567 89:;<=>? @ABCDEFG
    HIJKLMNO PQRSTUVW XYZ[\]^_ `abcdefg hijklmn' ;;
    -b) exec yes '
                                            *' ;;
    *)  echo "Usage: `basename $0` [-b]" 1>&2; exit 1;;
    esac

- JP

42.6 Screen Size Testing Files |  | 42.8 Errors Erased Too Soon? Try These Workarounds