设为首页 加入收藏

TOP

Linux shell之read 用法
2014-11-24 01:45:48 来源: 作者: 【 】 浏览:0
Tags:Linux shell read 用法

Linux shell之read 用法


#!/bin/bash
#read 用来读取屏幕输入或是读取文件内容。
read -p "please input you name: " name #获取输入变量
read -p "please input you age: " age #获取输入变量
echo "you name is $firstname ,age is $age" #输出变量内容


#执行结果
[root@sql tmp]# ./read
please input you name: liyang
please input you age: 100
you name is liyang,age is 100



read a

(续表)


相关阅读


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Linux shell date 用当天时期做备.. 下一篇pcDuino+OpenCV实现人脸追踪摄像头

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: