linux sheel script demo
本站寻求有缘人接手,详细了解请联系站长QQ1493399855
demo1 (输入/输出)
1.1. target :
输入姓、名, 输出姓名
1.2. create directory
mkdir ~/bin
1.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 " Your full name is :" ${firstname} ${lastname}