Operating System - HP-UX
1751975 Members
4715 Online
108784 Solutions
New Discussion юеВ

Re: stty : not typewriter

 
SOLVED
Go to solution
Massimo_37
Frequent Advisor

stty : not typewriter

When I run certain scripts as cron job, I get an email with the following line a top
stty :: not typewriter . Has anyone seen this and could you suggest any fixes please ?
Many thnaks
7 REPLIES 7
KapilRaj
Honored Contributor

Re: stty : not typewriter

I think it is just a warning ... does it , Is it due to the script being interactive .. ?

Kaps
Nothing is impossible
Joseph Loo
Honored Contributor
Solution

Re: stty : not typewriter

hi,

this is very common:

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=35433

read what the master, James has to say.

regards.
what you do not see does not mean you should not believe
Sanjay Kumar Suri
Honored Contributor

Re: stty : not typewriter

Check this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=85520
sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Simon Hargrave
Honored Contributor

Re: stty : not typewriter

It basically means you don't have a tty attached (as in an interactive session). It's the "stty" commands in your .profile that are complaining. Basically it means: -

"how can i configure what keys do what if you haven't got a keyboard!!"

When seen through cron, these errors can happily be ignored. If you really don't want to see them, redirect output to /dev/null
Massimo_37
Frequent Advisor

Re: stty : not typewriter

This is the script that I think causes problem:

#!/bin/sh tty -s if [ "$?" != "0" ] then . /etc/profile fi exp FILE=/disc5/Exports/Full_Prod0.dmp GRANTS=Y CONSTRAINTS=Y FULL=Y USERID=system/passwd exit 0

And in /etc/profile I have
tty -s istty=$? [ "$istty" = "0" ] && trap "echo logout" 0 Coul you please suggest wether there is any way of rewriting this which will get rid of my error - ~
Chris Watkins_1
Respected Contributor

Re: stty : not typewriter

Create a resource file, separate from your profile,
that contains all your common environment variable that
your scripts need. Source *that*, and quit sourcing the profile.

Either that, or rewrite the profile so that stty command
execution is conditional on being sourced via tty.

Not without 2 backups and an Ignite image!
Massimo_37
Frequent Advisor

Re: stty : not typewriter

Thank you all- I changed profile to
tty -s [ "$?" = "0" ] && stty erase '^?'
and it is okay now
Many Thanks