test命令
来源:互联网 发布:sql 中文字符串函数 编辑:程序博客网 时间:2024/05/18 02:35
命令格式
test expression
expression中包含一个以上的判断准则以作为test评诂的标准。两准则间用"-a"代 表逻辑AND 运算,"-o"代表逻辑OR运算,而在准则前放置一"!"代表NOT 运算。如 果没有括号,则优先权则为"!"> "-a" > "-o" 。和expr命令相同,想使用左右括号时,必须在其前面加上"\"。以下是有关准则的叙述(符合叙述时传回真,否则传回伪):
string string不为空白字串
-n string string的长度大於0
-z string string的长度等於0
string1=string2 string1等於string2
string1!=string2 string1不等於string2
int1 -gt int2 int1大於int2
int1 -ge int2 int1大於等於int2
int1 -eq int2 int1等於int2
int1 -ne int2 int1不等於int2
int1 -le int2 int1小於等於int2
int1 -lt int2 int1小於int2
-r filename 档案可读取
-w filename 档案可写入
-x filename 档案可执行
-f filename 档案为一般档
-d filename 档案为目录
-s filename 档案为非空的一般档
test-r "$filename" -a -s "$filename"
- test命令
- test 命令
- test命令
- test命令
- test命令
- test 命令
- test命令
- test命令
- test 命令
- test命令
- test 命令详解
- test命令的使用
- shell中的test命令
- or and test命令
- Linux命令:test
- test命令参数表
- 脚本test命令
- test命令用法
- jQuery插件开发全解析
- 学习的第二天
- iOS 画图总结
- Jquery绑定事件(bind和live的区别)
- 电池信息测试
- test命令
- 解决The InnoDB feature is disabled; you need MySQL built with InnoDB
- HTML框架
- 创建型模式专题总结(Creational Pattern)
- Installing APC op-code cache on Ubuntu 10.04
- [精华] Oracle 游标使用大全
- 学习的第三天
- source insight 常用快捷键
- Boost库单元测试使用配置