I've seen this error before and have found a number of threads discussing it however I've not seen anything similar with a solution to my issue, not sure if anyone can help.
I've a script that reads commands from a file. This is done in a while loop. Depending on certain fields read from the file the script performs various tasks.
One of these tasks is calling another script and passing in some parameters for it to run. At this point I get the "stty: : Inappropriate ioctl for device" message, but then the script completes successfully.
I found in a forum something which helped me isolate the issue and I believe its due to the redirection of STDIN whilst reading the file. Excerpt follows:
#loop through poll file and extract commands
while IFS=, read ID HOST_NAME DATABASE_NAME COMMAND RESULT_TYPE FREQUENCY LAST_RUN_DTE OUTPUT_TARGET
do
#Skip header,
if [ ${HOST_NAME} = "HOST_NAME" ]; then
continue
fi
${SCRIPT_DIR}/db_space_alloc_and_free.ksh ${1}
done < $FILE
The output I get everytime I try to run a sub-script is:
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
I'm guessing the number of errors indicates the number of times its reading the variables or something. Can someone advise a solution? I've been looking at saving the stty settings prior to the file read and then resetting it just before I call the script but i'm having no luck.
Regards,
sapatos
I've a script that reads commands from a file. This is done in a while loop. Depending on certain fields read from the file the script performs various tasks.
One of these tasks is calling another script and passing in some parameters for it to run. At this point I get the "stty: : Inappropriate ioctl for device" message, but then the script completes successfully.
I found in a forum something which helped me isolate the issue and I believe its due to the redirection of STDIN whilst reading the file. Excerpt follows:
#loop through poll file and extract commands
while IFS=, read ID HOST_NAME DATABASE_NAME COMMAND RESULT_TYPE FREQUENCY LAST_RUN_DTE OUTPUT_TARGET
do
#Skip header,
if [ ${HOST_NAME} = "HOST_NAME" ]; then
continue
fi
${SCRIPT_DIR}/db_space_alloc_and_free.ksh ${1}
done < $FILE
The output I get everytime I try to run a sub-script is:
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
I'm guessing the number of errors indicates the number of times its reading the variables or something. Can someone advise a solution? I've been looking at saving the stty settings prior to the file read and then resetting it just before I call the script but i'm having no luck.
Regards,
sapatos