!/bin/bash
echo "Please type a word!"
read word
echo "You just typed $word"
echo "Please type two words!"
read word1 word2
echo "You just typed $word1 $word2"
[jerry@localhost bin]$ ./reply_test.sh
./reply_test.sh: line 1: !/bin/bash: No such file or directory
Please type a word!
word
You just typed word
Please type two words!
word1 word2
You just typed word1 word2
echo "Please type a word!"
read word
echo "You just typed $word"
echo "Please type two words!"
read word1 word2
echo "You just typed $word1 $word2"
[jerry@localhost bin]$ ./reply_test.sh
./reply_test.sh: line 1: !/bin/bash: No such file or directory
Please type a word!
word
You just typed word
Please type two words!
word1 word2
You just typed word1 word2
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23895263/viewspace-697718/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23895263/viewspace-697718/