首页 > 系统服务 > 详细

Linux命令-read

时间:2019-10-29 13:20:48      阅读:88      评论:0      收藏:0      [点我收藏+]

[chenjl@ipha-dev71-1 yysoft]$ read -p "check run the script is the mysql server? (y/n) " choice check run the script is the mysql server? (y/n) y [chenjl@ipha-dev71-1 yysoft]$ echo $choice y

详细解释:

p是prompt的缩写,指提示信息

read -p "check run the script is the mysql server? (y/n) " choice

以上命令回车后会显示 check run the script is the mysql server? (y/n)

之后用户输入的内容会被保存到choice变量中

Linux命令-read

原文:https://www.cnblogs.com/wang-mengmeng/p/11757676.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!