-
~# cat 3.sh
#!/bin/sh sh ./2.sh << eof yes000 no_no eof
-
~# cat 2.sh
#!/bin/sh echo "please input..." read -t 3 line read -t 3 line_two echo $line#1111 echo $line_two#2222
-
~# ./3.sh,输出为:
~# ./3.sh please input... yes000#1111 no_no#2222
~# cat 3.sh
#!/bin/sh
sh ./2.sh << eof
yes000
no_no
eof
~# cat 2.sh
#!/bin/sh
echo "please input..."
read -t 3 line
read -t 3 line_two
echo $line#1111
echo $line_two#2222
~# ./3.sh,输出为:
~# ./3.sh
please input...
yes000#1111
no_no#2222