shell语法if else elif
来源:互联网 发布:淘宝企业店铺品牌授权 编辑:程序博客网 时间:2024/05/16 11:50
#!/bin/sh
#
# test the if .. elif .. else
#
if [ $1 -gt 0 ] ; then
echo "$1 is positive"
elif [ $1 -lt 0 ] ; then
echo "$1 is negative"
elif [ $1 -eq 0 ] ; then
echo "$1 is zero"
else
echo "$1 is not a number"
fi
#
# test the if .. elif .. else
#
if [ $1 -gt 0 ] ; then
echo "$1 is positive"
elif [ $1 -lt 0 ] ; then
echo "$1 is negative"
elif [ $1 -eq 0 ] ; then
echo "$1 is zero"
else
echo "$1 is not a number"
fi
- shell语法if else elif
- Shell脚本语法-- if/then/elif/else/fi
- Shell脚本语法-- if/then/elif/else/fi
- Shell脚本语法-- if/then/elif/else/fi
- Shell脚本语法--if/then/elif/else/fi
- shell-007: if elif else
- shell Learning [if elif else 的用法]
- Shell if elif else Code Example
- shell中的if elif else用法
- shell中if-elif-else用法
- linux shell 条件判断if else, if elif else....
- if-elif-else使用
- if-elif-else
- Shell编程中if-elif-else条件分支语句测试
- #if, #elif, #else和#endif
- #if, #elif, #else, #endif 使用
- if-elif-else的理解
- #if, #elif, #else, #endif 使用
- 获取IOS应用安装列表
- Linux下使用无线网卡搭建AP
- NEFU 697 Similar Word KMP
- 各种应用访问jboss5.0管理数据源方式
- C++ 常量指针或者常量引用作为函数参数传递的原因
- shell语法if else elif
- shell语法for
- POJ 1195 二维线段树||二维树状数组
- STL之Binary search
- 获取IOS应用安装列表
- linux下C语言中的flock函数用法
- shell语法function
- NEFU 698 Post office 大概是dp?
- couchbase安装fedora18上的问题