判断命令test 使用test命令可以对文件,字符串等进行测试,一般配合控制语句使用,如while,if,case "字符串测试" test str1==str2 测试字符串是否相等 test str1!-str2 测试字符串是否不相等 test str1 测试字符串是否不为空 test -n str1 测试字符串是否不为空 test -z str1 测试字符串是否为空 "int 测试" test int1 -eq int2 测试整数是否
test命令用法.功能:检查文件和比较值 shell中test命令方法详解 原文:https://www.cnblogs.com/guanyf/p/7553940.html 1)判断表达式 if test (表达式为真) if test !表达式为假 test 表达式1 –a 表达式2 两个表达式都为真 test 表达式1 –o 表达式2 两个表达式有一个为真 2)判断字符串 test –n 字符串
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long)