stty: : Not a typewriter


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers stty: : Not a typewriter
# 1  
Old 11-05-2002
stty: : Not a typewriter

stty: : Not a typewriter

the above error comes after i execute the script below o hpux B.11.00

#!/usr/bin/ksh

/bin/su - <oraid> -c "svrmgrl" << EOF
connect internal
startup
exit
EOF
echo "# End "`date +%D" "%T` >> time.log
yls177
# 2  
Old 11-05-2002
I assume that you actually have something sensible in place of "<oraid>".

The stty command sends ioctl's to its stdin. You can do this:
stty -a > stty.out
but you cannot do this:
stty -a > stty.out < /dev/null
because /dev/null is not a tty device. Ther ioctl's will fail.

Some people put stty commands in their startup scripts (.profile for ksh). Ideally, they should test to see if the shell is interactive.

When you run "su -", you are asking for the startup scripts to run. But the su statement does not have stdin connected to a tty. So the stty in the start script fails and you get the error message.
# 3  
Old 11-05-2002
I assume that you actually have something sensible in place of "<oraid>".

>> yes, i have.

The stty command sends ioctl's to its stdin. You can do this:

>> ioctl.. hmmm, i did a man ioctl and after reading, my understanding is that it controls the input and ouput of a device. am i right?

stty -a > stty.out
but you cannot do this:
stty -a > stty.out < /dev/null
because /dev/null is not a tty device. Ther ioctl's will fail.

>> hmmm, does /dev/null and 2&>1 differ?

Some people put stty commands in their startup scripts (.profile for ksh). Ideally, they should test to see if the shell is interactive.

When you run "su -", you are asking for the startup scripts to run. But the su statement does not have stdin connected to a tty. So the stty in the start script fails and you get the error message.

>> so u mean that we can actually connect a tty to the command su - ?
yls177
# 4  
Old 11-05-2002
not this but similar

I have seen that same error message upon reboot. It escapes me as to what it was related, but I do remember seeing it at boot time on HPUX systems 11.0.

The proverbial " Xxxx is not a typewriter" phrase. I think I will look on the ITRC site for HPUX support. Maybe I will get a hit! Smilie

www.itrc.hp.com
# 5  
Old 11-06-2002
When it happens at boot time it is usually because someone did a "su -" inside a start-up script. Also some scripts will actually source a .profile to set some environment variables.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use stty?

Hi , I have shell scripting in linux box. This script is mentioned that should be run under the one particular user. If you run that mentioned user location then it is working fine.... Suppose if you are trying run from some other user like as mentioned below sudo su - gxadm -c script.sh ... (1 Reply)
Discussion started by: Mani_apr08
1 Replies

2. UNIX for Advanced & Expert Users

stty issues

Copy Paste Issue... Pasted some c**p of a excel...!! Sorry Guys. Please look Below for the issue. (4 Replies)
Discussion started by: grep_me
4 Replies

3. Shell Programming and Scripting

stty: : I/O Error

Hi all, I am stuck on a shell script issue and need your inputs: I have a parent script A.ksh which call in another script B.ksh. At the start of the B.ksh, we export the .profile of another user and then call Informatica jobs. Issue When I run my jobs from the command prompt, it works... (1 Reply)
Discussion started by: fromrishi
1 Replies

4. OS X (Apple)

Using stty

Hello, I am trying to configure a serial port, for mac os x 10.6. I believe I can use the stty command to look at serial port configuration and or change the serial port settings. I read the man page, but I don't really know what I am doing. Any help? (0 Replies)
Discussion started by: jamesapp
0 Replies

5. UNIX for Dummies Questions & Answers

stty: : Not a typewriter with AUTOSYS error

(sys10:pt:/pf>) cat 122974qqq.s RUNAS Version 2007.10.07 Run on Dec 11 2008 10:09:36 AM UNIX Process: 26021 Login User : root PFW User : s08280 Not a terminal stty: : Not a typewriter stty: : Not a typewriter ksh: jil: not found ksh: sendevent: not found... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

6. UNIX for Advanced & Expert Users

stty: : Not a typewriter -- Help please

Hi All, I have been runing the same set of program using the same auto profile for an year. Now when i run the same set of process , i getting the below error Not a terminal stty: : Not a typewriter stty: : Not a typewriter ksh: jil: not found ksh: sendevent: not found logout... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

7. UNIX for Advanced & Expert Users

stty erase r

after hitting this command...on pressing r acts as a backspace character.... how to disable this function (5 Replies)
Discussion started by: bishweshwar
5 Replies

8. UNIX for Advanced & Expert Users

not a typewriter error

I am getting the error "not a typewriter" when my program invokes the sscanf function. What does this error imply and how can I get past it ? Thanks in advance. (2 Replies)
Discussion started by: jxh461
2 Replies

9. UNIX for Dummies Questions & Answers

stty

I am trying to set my backspace key as the erase key right now I have to type CONTROL-H to delete. Can you please tell me the command to set my backspace as the erase key...... (1 Reply)
Discussion started by: frank
1 Replies
Login or Register to Ask a Question