Eg:
- #!/bin/bash
- #echo
- echo –e “This echo’s 3 new lines \n\n\n”
- echo “ok”
- echo
- echo “This echo’s 3 new lines\n\n\n”
- echo “The log files have all been done”>mylogfile.txt
Eg:
- #!/bin/bash
- #readmname
- echo -n "First Name:"
- read firstname
- echo -n "Last Name:"
- read lastname subname
- echo -e "your First Name is :$firstname\n"
- echo -e "your Last Name is :$lastname\n"
- echo -e "your Subname is:$subname\n"
大家学会了吗?有什么不懂的地方可以给我留言。
转载于:https://blog.51cto.com/sucre/424913