I dont know if it is weird that read is not taking the input from the terminal.
The configure script, which is used in source code making process, should ask the user to give the input to select the type of Database either MYSQL or ORACLE(below is the code).
MYSQLLIBPATH="/usr/lib/mysql" echo "Enter DataBase-Type 1-ORACLE, 2-MySQL (default MySQL):" read in echo $? >> /tmp/error.log if test -z "$in" -o "$in" = "2" then DATABASE=-DDB_MYSQL if true; then MYSQL_TRUE= MYSQL_FALSE='#' else MYSQL_TRUE='#' MYSQL_FALSE= fi echo "Enter Mysql Library Path: (eg: $MYSQLLIBPATH (default))" read in echo $? >> /tmp/error.log if test -n "$in" then MYSQLLIBPATH=`echo $in` fi echo "Mysql Lib path is $MYSQLLIBPATH" else if false; then MYSQL_TRUE= MYSQL_FALSE='#' else MYSQL_TRUE='#' MYSQL_FALSE= fi DATABASE=-DDB_ORACLE LD_PATH= fi But, the read command is not asking for the user input. Its failing to take the input from the stdin.
When I checked the status of the command in the error.log it was showing 1 1 Could anyone tell why read is failing to take the input from the stdin. Are there any builtin variable which can block read taking the input?
read in >>/tmp/error.logemit?exec </dev/nullabove theread inline would explain what you are observing, because in this caseread inencounters an EOF, and sets$?to 1.