Operating System - HP-UX
1753326 Members
4908 Online
108792 Solutions
New Discussion юеВ

Re: Error stty: : Not a typewriter"

 
mpaschali
Occasional Contributor

Error stty: : Not a typewriter"

 
3 REPLIES 3
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

Re: Error stty: : Not a typewriter"