HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script with rsh has error stty : : I/O error
Operating System - HP-UX
1830898
Members
3207
Online
110017
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2004 10:00 PM
06-11-2004 10:00 PM
script with rsh has error stty : : I/O error
I run rsh through a k shell script. In the middle, if it dies a abnormal death, then "new line" are not working.
the stty output is :
rows = 24; columns = 80; ypixels = 0; xpixels = 0;
min = 1; time = 0;
erase = ^h; eof = ^a; swtch =;
brkint -inpck -istrip icrnl -ixany imaxbel onlcr tab3
-icanon -echo echoe echok echoctl echoke iexten
Here note that "icanon" and "echo" are negative.
If I try to correct this error by typing in the shell script, "stty icanon echo", then it gives a "stty : : I/O error". Tried setting "set i" and "tty -s". Still this error continues. Any ideas how to set the newline back in the script itself.
the stty output is :
rows = 24; columns = 80; ypixels = 0; xpixels = 0;
min = 1; time = 0;
erase = ^h; eof = ^a; swtch =
brkint -inpck -istrip icrnl -ixany imaxbel onlcr tab3
-icanon -echo echoe echok echoctl echoke iexten
Here note that "icanon" and "echo" are negative.
If I try to correct this error by typing in the shell script, "stty icanon echo", then it gives a "stty : : I/O error". Tried setting "set i" and "tty -s". Still this error continues. Any ideas how to set the newline back in the script itself.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2004 02:38 AM
06-12-2004 02:38 AM
Re: script with rsh has error stty : : I/O error
Hi,
I hope,
stty sane
can resolve the problem.
If your stty settings are not standard, you can store them by
STT=$(stty -g)
and restore by
stty $(echo $STT)
BTW, how do you run rsh ?
remsh hostname command
or
ramsh hostname -n command ?
The second way is better.
HTH
I hope,
stty sane
can resolve the problem.
If your stty settings are not standard, you can store them by
STT=$(stty -g)
and restore by
stty $(echo $STT)
BTW, how do you run rsh ?
remsh hostname command
or
ramsh hostname -n command ?
The second way is better.
HTH
Entities are not to be multiplied beyond necessity - RTFM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2004 06:21 AM
06-12-2004 06:21 AM
Re: script with rsh has error stty : : I/O error
Not sure if this will help in your error or not, but in our remsh scripts the following variable declaration resolved stty errors-
export DISPLAY="$(hostname):00"
Regards,
dl
export DISPLAY="$(hostname):00"
Regards,
dl
"I'm not dumb. I just have a command of thoroughly useless information."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2004 02:11 PM
06-12-2004 02:11 PM
Re: script with rsh has error stty : : I/O error
rsh (remsh on HP-UX) is a specialized coomand that is not interactive. The problem is that your remote machine has not protected /etc/profile and .profile (assuming POSIX or Korn shell) for non-interactive runs. The stty command (and tput ttytype tset tabs) must have a real terminal and your script is not a terminal. In both /etc/profile and .profile, use the tty command to encapsulate these commands:
if tty -s
then
...commands like stty tput tabs, etc
fi
In other words, the remote login must bypass these special commands when using remote shell in a script.
Bill Hassell, sysadmin
if tty -s
then
...commands like stty tput tabs, etc
fi
In other words, the remote login must bypass these special commands when using remote shell in a script.
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP