I run a shell on Solaris and got "stty: : Inappropriate ioctl for device" message. The program runs very well except that message. I know this is because I use "host" inside the SQL PLUS session. But, why? If I run this in a standalone SQL PLUS session (I mean, not through a shell),
there is no such message.
Does any one have any idea?
This is the shell I run:
EMAIL_ADDRESSfirstname.lastname@example.org; export EMAIL_ADDRESS
if test $# -ne 1
echo Usage: `basename $0` sid
sqlplus -s /nolog <<__EOF 1>$LOG_FILE 2>&1
select sysdate from dual;
cat $LOG_FILE|mailx -s "logfile" email@example.com
The result of the logfile. Please see the "ioctl" at the bottom.
stty: : Inappropriate ioctl for device
Thu Apr 26 11:19:35 PDT 2001
It might be because that when you transfre the control to the host, it is getting to confuse what shell to use.
try using :"truss" to find out where it is going wrong.
Hope this would help you to debug things.