Shell scipt两种判断方式
来源:互联网 发布:淘宝店直通车怎么开 编辑:程序博客网 时间:2024/06/07 11:44
1、
#!/bin/bash#Program:# This program shows the user's choice #History:# 2013/08/26 ydonghaoPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binexport PATHread -p "Please input (Y/N): " aecho $a[ $a=Y -o $a=y ] && echo "OK, continue" && exit 0[ $a=N -o $a=n ] && echo "Oh, interrupt" && exit 0echo "I don't know what your choice is" && exit 0
2、
#!/bin/bash#Program:# This program shows the user's choice #History:# 2013/08/26 ydonghaoPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binexport PATHread -p "Please input (Y/N): " ynif [ "$yn" = "Y" ] || [ "$yn" = "y" ]; then echo "OK; continue " exit 0;fiif [ "$yn" = "N" ] || [ "$yn" = "n" ]; then echo "oh, interrupt " exit 0;fiecho "I don't know what your choice is" && exit 0
- Shell scipt两种判断方式
- shell脚本的两种执行方式
- Linux Shell的两种加密方式
- 运行shell脚本的两种方式
- Linux Shell的两种加密方式
- vim和shell交互两种方式
- shell读取mysql数据库两种方式
- 判断素数的两种方式
- shell 条件判断的几种方式!
- 【shell 1】Shell简介:什么是Shell,Shell命令的两种执行方式
- 【Shell脚本学习1】Shell简介:什么是Shell,Shell命令的两种执行方式
- shell教程-001:shell简介 什么是shell,shell命令的两种执行方式
- Shell简介:什么是Shell,Shell命令的两种执行方式
- 一、Shell简介:什么是Shell,Shell命令的两种执行方式
- Shell简介:什么是Shell,Shell命令的两种执行方式
- Shell简介:什么是Shell,Shell命令的两种执行方式
- Shell简介:什么是Shell,Shell命令的两种执行方式
- Shell简介:什么是Shell,Shell命令的两种执行方式
- 分数的累加(1)
- Java 23种设计模式详尽分析与实例解析之三--行为型模式
- poj-3628
- 设计模式-------创建型模式总览
- Keil C51对C语言的关键词扩展之十六:sfr16
- Shell scipt两种判断方式
- 分数的累加(2)
- servlet + jsp分页
- MongoDB(3)
- 用火狐浏览器下载中文文件名的文件乱码及其解决
- 无题
- Cortex‐M3 Thumb‐2 指令集
- Java异常的面试问题及答案
- MongoDB(4)