#!/bin/bash
# -*- coding: utf-8 -*-
# echo -n "please input your name: "
read name
echo "hello $name,welcome to my linux!"
exit 0 #下面来看看使用-p选项的效果,与上面等效。 read -p "please input your name: " name
echo "hello $name,welcome to my linux!"
#-p,添加提示符。 #读取输入,但不在屏幕显示
read -s -p "password: " password
echo "" #用来换行
echo "your password is $password."
exit 0 #设置定时器,-t选项
read -t 5 -p "name: " name
echo "your name is $name."
exit 0

shell脚本之read工具的更多相关文章

  1. shell脚本动画小工具

    shell脚本动画小工具 看gif图: shell脚本版 脚本内容如下: #!/usr/bin/env bash ## ---------------------------------------- ...

  2. shell脚本调试之工具——bashdb

    bash是Unix/Linux操作系统最常用的shell之一,它非常灵活,和awk.c++配合起来异常强大 以下使用一个测试脚本来说明使用bash调试的方法 test.sh #!/bin/bash e ...

  3. shell脚本调试

    转自:http://www.ibm.com/developerworks/cn/linux/l-cn-shell-debug/ 一. 前言 shell编程在unix/linux世界中使用得非常广泛,熟 ...

  4. shell脚本的调试技巧

    请参考文章:http://www.ibm.com/developerworks/cn/linux/l-cn-shell-debug/index.html 读后的感觉,还是用shell的选项灵活,方便. ...

  5. 【转】Linux Shell脚本调试技术

    本文转载自:https://www.ibm.com/developerworks/cn/linux/l-cn-shell-debug/ Shell脚本调试技术 本文全面系统地介绍了shell脚本调试技 ...

  6. shell脚本调试技术_转

    转自:http://itlab.idcquan.com/linux/SHELL/727128.html 参考:https://linux.cn/article-8045-1.html 本文全面系统地介 ...

  7. 使用sh-x调试shell脚本_转

    参考:http://blog.chinaunix.net/uid-20564848-id-73502.html 1. 通过sh -x 脚本名  #显示脚本执行过程2.脚本里set -x选项,轻松跟踪调 ...

  8. 【转】shell脚本调试(bash trap support bashdb )

    原文网址:http://zhu8337797.blog.163.com/blog/static/170617549201122512712136/ 命 令 选 项 功 能 bash –x 脚本名 回显 ...

  9. Shell脚本调试技术

    http://www.ibm.com/developerworks/cn/linux/l-cn-shell-debug/ 一. 前言 shell编程在unix/linux世界中使用得非常广泛,熟练掌握 ...

随机推荐

  1. 【动态规划】【零一背包】CODEVS 1014 装箱问题 2001年NOIP全国联赛普及组

    #include<cstdio> #include<algorithm> using namespace std; ],f[]; int main() { scanf(&quo ...

  2. openresty的时间获取

    ngx.say('ngx.time()' .. ngx.time()) ngx.say('ngx.now()' .. ngx.now()) ngx.say('ngx.today()' .. ngx.t ...

  3. STL之全排列

    描述 使用STL中的next_permutation函数输出一个序列的全排列. 部分代码已经给出,请补充完整,提交时请勿包含已经给出的代码. int main() { vector<int> ...

  4. 【R笔记】glm函数报错原因及解析

    R语言glm函数学习:  [转载时请注明来源]:http://www.cnblogs.com/runner-ljt/ Ljt 作为一个初学者,水平有限,欢迎交流指正. glm函数介绍: glm(for ...

  5. SqlMapConfig.xml详细介绍

    1,连接数据库 <!--配置环境,默认的环境id为oracle --> <environments default="oracle"> <!-- 配置 ...

  6. Silverlight游戏设计(Game Design):(十四)练习用游戏素材资源的获取及相关工具使用心得 --转

    Silverlight游戏设计(Game Design):(十四)练习用游戏素材资源的获取及相关工具使用心得 通过前6节的Demo制作演示,大家应该已经相当熟悉这款Silverlight-2D游戏场景 ...

  7. Build a Restful Service

    最近项目中遇到的REST的问题很多,很多情况下受weblogic以及Jdeveloper版本的影响,无法直接从Jdeveloper中生成一个RESTful Service出来,所以基于流行的Sprin ...

  8. 2017.11.15 String、StringBuffer、StringBuilder的比较(todo)

    参考来自:http://blog.csdn.net/jeffleo/article/details/52194433 1.速度 一般来说,三者的速度是:StringBuilder > Strin ...

  9. linux后台启动命令-的原因

    linux后台启动命令-的原因 学习了:https://blog.csdn.net/saife/article/details/78276014 学习了:https://www.ibm.com/dev ...

  10. Unity网游开发生存指南—蒸汽之城

    Posted by amy on 2013.03.07 文 / 王楠(梦加网络 游戏制作人) 前段时间关于Unity是否适合国内手游/网游创业团队的讨论非常火爆,本文从<蒸汽之城>的开发历 ...