Linux中read接收用户输入
来源:互联网 发布:淘宝 clarks小公主 编辑:程序博客网 时间:2024/05/18 01:49
#!/bin/bash
#提示Please input your name并等待20秒,把输入内容存入变量name中
read -t 20 -p "Please input your name: " name
echo "input name is $name"
#-s选项隐藏输入,用于隐藏项
read -s -t 20 -p "Please enter your password: " pwd
echo -e "\n"
echo "input password is $pwd"
#-n 1表示只接收一个输入字符就会执行,不需要输入回车
read -n 1 -t 20 -p "Please input your gender[M/F]:" gender
echo -e "\n"
echo "input gender is $gender"
#提示Please input your name并等待20秒,把输入内容存入变量name中
read -t 20 -p "Please input your name: " name
echo "input name is $name"
#-s选项隐藏输入,用于隐藏项
read -s -t 20 -p "Please enter your password: " pwd
echo -e "\n"
echo "input password is $pwd"
#-n 1表示只接收一个输入字符就会执行,不需要输入回车
read -n 1 -t 20 -p "Please input your gender[M/F]:" gender
echo -e "\n"
echo "input gender is $gender"
1 0
- Linux中read接收用户输入
- Struts2中接收用户输入
- Linux接收键盘输入read
- python 接收用户的输入
- shell read处理用户输入示例讲解
- CMD命令行接收用户输入信息
- [Visual C++系列] 3.2 接收用户输入
- java实例之接收用户控制台输入
- 批处理接收来自用户输入的参数
- 接收用户输入-scanf函数
- CMD命令行接收用户输入信息
- java接收用户的输入和输出
- linux shell中read
- linux--处理用户输入
- linux命令之 交互式输入read
- Linux命令之读取输入-read
- linux交互式输入自动化 read & expect
- Linux Shell学习:使用read从标准输入中读取一行
- 自学MVC看这里——全网最全ASP.NET MVC 教程汇总
- 飞思卡尔IMX6处理器的GPIO配置方式
- Oracle 10g的安装步骤和注意事项
- 海思移植opencv+人脸检测+速度优化
- Java中List、Set、Map区别--小记
- Linux中read接收用户输入
- 把在程序中的System.out.print()的信息自动转成log4j日志信息
- JavaScript 读取XML文件进行广告播放
- 《图像处理》Part1 YUV4:2:2toYUV4:2:0、YUV420toYUV422、YUV422toRGB24、YUV420toRGB24算法
- Android APK打包流程详解
- OPENWRT入门之四------openwrt命令行模式命令及其工具
- Android:控件WebView显示网页
- JavaScript 读取XML 数据
- studio启动ADB