cancel
Showing results for 
Search instead for 
Did you mean: 

Error stty: : Not a typewriter"

mpaschali
Occasional Contributor

Error stty: : Not a typewriter"

 
3 REPLIES
Wodisch
Honored Contributor

Re: Error stty: : Not a typewriter"

hello,

I can only guess: you have a shell-script, which runs
ok when started interactively, but you get that message
when you run it as batch, say from within "crontab"
or some script doing "su -"...
Well, you have to "embrace" all calls to "stty" with an
"if" to make shure your script IS connected to tty, i.e.
runs interactively.
Do it like

if [ -t 0 ]
then stty -istrip cs8 # whatever you want...
fi

If it happens due to using "su", then check the login
scripts for that user:
/etc/profile
$HOME/.profile
$HOME/.shrc

HTH,
Wodisch
Printaporn_1
Esteemed Contributor

Re: Error stty: : Not a typewriter"

try redirect error and output to /dev/null

command > /dev/null 2>&1
enjoy any little thing in my life
Vincenzo Restuccia
Honored Contributor