linux Shell : Test命令参数解析
来源:互联网 发布:linux tomcat启动 停止 编辑:程序博客网 时间:2024/06/06 05:02
格式: test conditions
test -n string : string 不为空
test -z string : string 为空
test -n string : string 不为空
test -z string : string 为空
test int1 -eq int2 : int1 == int 2
test int1 -ne int2 : int1 != int2
test int1 -gt int2 : int1 > int2
test int1 -ge int2 : int1 >= int2
test int1 -lt int2 : int1 < int2
test int1 -le int2 : int1 <= int2
test -r filename : 用户对文件filename有读权限
test -w filename : 用户对文件filename有写权限
test -x filename : 用户对文件filename有可执行权限
test -f filename : 文件filename为普通文件
test -d filename : 文件filename为目录
test -c filename : 文件filename为字符设备文件
test -b filename :文件filename为块设备文件
test -s filename : 文件filename大小不为零
test -t fnumb : 与文件描述符fnumb(默认值为1)相关的设备是一个终端设备
test ! -s empty : empty 为空
test -a : And
test -o : Or
注意test命令和[ ]中括号作用是一样的。
- Linux Shell : Test命令参数解析
- Linux Shell : Test命令参数解析
- Linux Shell : Test命令参数解析
- linux Shell : Test命令参数解析
- Linux Shell : Test命令参数解析
- Shell Test命令参数解析
- Shell Test命令参数解析
- Shell Test命令参数解析
- Linux Shell Test 命令
- Linux shell test,[...] 命令
- LINUX SHELL中的TEST命令
- LINUX SHELL中的TEST命令
- shell test和find命令实例解析
- Linux shell 的 test 命令用法详解
- Linux test 脚本 shell 命令详解
- Linux shell 的 test 命令用法详解
- Linux shell 的 test 命令用法详解
- Linux shell 的 test 命令用法详解
- HTML5 经量级框架 jQuery Mobile 内容格式布局,折叠块内容 - 7.6
- window下expdp每天全库备份和自动删除两天前的备份文件脚本
- android下载网络图片并缓存
- 你必须找到你所钟爱的东西
- 利用opencv进行图像文件读入和显示
- linux Shell : Test命令参数解析
- iOS网络编程post和get实例 区别
- Amoeba及其类似产品
- socket联接断开后重连很慢
- 非常有意思的杂项资源
- shell脚本中一些特殊符号
- 关键链接记录
- C++ Report: 模式的力量
- UVa 108 - Maximum Sum (最大子矩阵)