linux sheel script demo
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux sheel script demo相关的知识,希望对你有一定的参考价值。
1. target :
输入姓、名, 输出姓名
2. create directory
mkdir ~/bin
3. create & edit sheel script
vim fullname.sh
note: more comment is useful
#!/bin/bash #Program # User inputs his first name and last name . Program shows his full name. #History : #2017/04/10 logan First lease PATH=/bin:$PATH #将当前目录加入系统环境 export PATH read -p "Please input your firstname:" firstname read -p "Please input your lastname:" lastname echo -e "\nYour full name is :" ${firstname} ${lastname}
4. run
[[email protected] bin]$ sh fullname.sh
以上是关于linux sheel script demo的主要内容,如果未能解决你的问题,请参考以下文章