home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 42.6 Screen Size Testing Files Chapter 42
Problems with Terminals
Next: 42.8 Errors Erased Too Soon? Try These Workarounds
 

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


Previous: 42.6 Screen Size Testing Files UNIX Power Tools Next: 42.8 Errors Erased Too Soon? Try These Workarounds
42.6 Screen Size Testing Files Book Index 42.8 Errors Erased Too Soon? Try These Workarounds

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System