name: test-tool description: Evaluate conditional expressions for file testing, string comparison, and arithmetic checks. Use for shell script conditionals.
Evaluate expressions and return exit status 0 (true) or 1 (false). Used for file attribute testing, string comparison, and numeric checks in scripts.
test-tool <expression>
-f file: True if file exists-d dir: True if directory exists-z str: True if string is emptyn1 -eq n2: True if numbers equals1 = s2: True if strings equaltest-tool -f /etc/passwd
test-tool -d /home/user
test-tool 5 -gt 3
这个工具质量一般,文档说明清晰,但实际功能比文档描述的少很多。文件存在性检查可以正常工作,但文档提到的字符串比较、数字运算等功能都还没做出来。按照文档使用可能会失望,建议等功能完善后再使用。