首页 > 代码库 > linux sheel script demo
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
[rocky@localhost bin]$ sh fullname.sh
linux sheel script demo
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。