shell编程实例一从终端读取字符
来源:互联网 发布:原生js复制节点 编辑:程序博客网 时间:2024/05/08 22:26
#!/bin/sh
echo "Input date with format yyyy mm dd:\c"
read year month day
echo "Today is $year/$month/$day, right"
echo "press enter to confirm and continue\c"
read a
echo "I know the date, bye"
echo "Input date with format yyyy mm dd:\c"
read year month day
echo "Today is $year/$month/$day, right"
echo "press enter to confirm and continue\c"
read a
echo "I know the date, bye"
注释:
#!/bin/sh 指定解析shell的类型,sh为传统shell,bash为默认使用的shell
\c这个转义字符表示,不换行,只能使用与sh类型的shell
- shell编程实例一从终端读取字符
- shell读取终端数据
- shell 终端字符颜色
- shell终端控制字符
- shell 终端字符颜色
- linux 终端 读取每个字符
- shell脚本编程实例(一)
- shell 读取一个字符
- shell脚本读取终端输入的方法
- Shell终端输出字符的颜色总结
- Shell精彩编程实例
- Shell 编程实例集锦
- shell编程实例
- shell编程实例六
- Linux Shell编程实例
- shell编程随机数实例
- linux shell 编程实例
- shell实例编程4
- linux2.6.22.6中针对s3c2410的LCD驱动移植
- 音频uda1341驱动移植
- 回环地址导致安装OID11g 出错(Linux)
- 软考笔记
- shell特殊字符详解
- shell编程实例一从终端读取字符
- shell编程实例二判断文件类型
- shell编程实例三实现简单运算符
- shell编程实例四实现文件拷贝
- shell编程实例五判断用户是否在线
- shell编程实例六
- Makefile文件简介
- 实例二、从字符串中取出所有整数
- 实例一、求二维数组的和