您的位置:首页 > 运维架构 > Shell

shell 命令案例

2014-03-16 23:46 211 查看
从控制台中读取参数,并输出出来

#!/bin/bash
#Programe 切换bash 表明shell脚本的编写目的
# input data to the programe
#History 注明编写时间和编写人 下面是将环境变量添加上去
#2014/3/16 tom
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

read -p "input your first name :" firstname
read -p "input your second name: " secondname
echo "\n your name is : $firstname $secondname\n"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  shell 脚本