ITPub博客

首页 > Linux操作系统 > Linux操作系统 > reading input to shell

reading input to shell

原创 Linux操作系统 作者:wuxidba 时间:2011-06-12 18:36:33 0 删除 编辑
!/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


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23895263/viewspace-697718/,如需转载,请注明出处,否则将追究法律责任。

下一篇: bash trap
请登录后发表评论 登录
全部评论

注册时间:2010-05-12

  • 博文量
    64
  • 访问量
    63198