{ "name": "test", "section": 1, "title": "evaluate a condition", "synopsis": [ "test [OPTION]... [OPERAND]..." ], "description": "File and string predicates: -e -f -d -r -w -x -s -h/-L, -z -n, string = !=, integer -eq -ne -lt -le -gt -ge (decimal integers only), file mtime FILE1 -nt FILE2 / -ot and same-inode -ef when stat exposes dev+ino.", "bareOsNotes": "-ef falls back to path string compare if dev/ino missing.", "options": [], "keywords": [ "test", "bare-os", "coreutils" ], "examples": [ { "caption": "file exists", "code": "test -f ~/.barerc && echo yes" }, { "caption": "directory", "code": "test -d /home/user" }, { "caption": "string equal", "code": "test \"$USER\" = guest" } ] }