我的脚本抛出错误读取错误:0:资源暂时不可用第二次用户输入(Unix用户名)是预期的.
我怀疑这与第一个后台进程(linux_fetch&)出错有关.
我如何解决这个问题,以便后台进程发布的用户提示符(Unix用户名)不会受到影响.
这是脚本的简短片段.
- if [ -r $linux_host_list ]
- then
- echo
- read -p 'Linux Username:' LUSERNAME
- read -p 'Linux Password:' LPASS
- linux_fetch &
- clear screen
- else
- echo "No Linux Servers found"
- fi
- if [ -r $unix_host_list ]
- then
- echo
- read -p 'Unix Username:' UNIXUNAME
- read -p 'Unix Password:' UPASS
- unix_fetch &
- clear screen
- else
- echo "No Unix Servers found."
- fi