stty: : Not a typewriter

DoN Nichols dnichols at ceilidh.beartrack.com
Fri Mar 8 10:01:52 AEST 1991


In article <1495 at das13.snide.com> dave at das13.snide.com (Dave Snyder) writes:
>That's the error message I get while doing various things on my machine.
>
>For example: when in vi, I like to read in the current date & time by typing
>"!!date".  What that does is fork a shell, run date and the output of date is
>read into the buffer (see example below).
>
>Wed Mar  6 07:31:23 EST 1991
>
>
>Now for some strange reason, this is what I get when I type "!!date".
>
>stty: : Not a typewriter
>Wed Mar  6 07:38:47 EST 1991

	Have you made any changes recently to your '.kshrc' (if using
/bin/ksh) or '.profile'?  Especially the '.kshrc'.  If I remember correctly,
the '.profile' is sourced only at logon, while the '.kshrc' is sourced
whenever a subshell is started, such as for running a command while in your
editor.

	What appears to be happening is that your '.kshrc' is trying to set
some terminal options whenever you start a new shell, (the kill char, etc),
and stty looks at standard output, determines it is a pipe (to your buffer
in vi), and it can't do ioctl's on a pipe which are intended for a tty,
therefore the 'not a typewriter' error message.  The stty operations are
better done in your '.profile'.  Maybe you can get away with redirecting it
to /dev/tty, but I wouldn't bet on it.

	Good Luck
		DoN.
-- 
Donald Nichols (DoN.)		| Voice (Days):	(703) 664-1585
D&D Data			| Voice (Eves):	(703) 938-4564
Disclaimer: from here - None	| Email:     <dnichols at ceilidh.beartrack.com>
	--- Black Holes are where God is dividing by zero ---



More information about the Comp.sys.3b1 mailing list