echo "do you want to start [y]?" read answer answer=`echo "$answer" |awk '{print tolower($1)}'` case $answer in n) echo "no" exit 1 ;; *) echo "yes" ;; esac |
Only foreground processes are allowed to read from or write to the terminal. Background processes which attempt to read from (write to) the terminal are sent a SIGTTIN (SIGTTOU) signal by the terminal driver, which, unless caught, suspends the process.
歡迎光臨 Chinaunix (http://www.72891.cn/) | Powered by Discuz! X3.2 |