get terminal speed from shell script
Guy Harris
guy at auspex.auspex.com
Wed Aug 29 07:01:12 AEST 1990
>By the way, the SUN manuals point out quite clearly that
>
> "the settings are reported on the standard error."
Yes, but they also point out equally clearly that
Special Requests
speed The terminal speed alone is printed on the stan-
dard output.
size The terminal (window) sizes are printed on the
standard output, first rows and then columns.
size and speed always report on the settings of
/dev/tty, and always report the settings to the
standard output.
so "stty speed" and "stty size", in *both* environments, report the
speed and size to the standard output.
The problem is that the BSD-environment "stty" normally fetches a bunch
of mode settings from the standard output when it starts up, and if that
fails, it quite reasonably reports this fact.
However, the failure is of no consequence if you're just doing "stty
speed" or "stty size", since the only data it uses comes from its
"ioctl" on "/dev/tty", so it shouldn't worry about the "ioctl"s on the
standard output (or shouldn't even do them in the first place!).
I think this bug is fixed in 4.1.
More information about the Comp.unix.questions
mailing list