mirror of
git://git.suckless.org/sbase
synced 2024-12-23 15:34:38 +00:00
96 lines
1.8 KiB
Groff
96 lines
1.8 KiB
Groff
.TH TEST 1 sbase\-VERSION
|
|
.SH NAME
|
|
test \- check file types and compare values
|
|
.SH SYNOPSIS
|
|
.B test
|
|
.RB EXPRESSION
|
|
.SH DESCRIPTION
|
|
.B Exit with the status determined by EXPRESSION.
|
|
.SH OPTIONS
|
|
.TP
|
|
.B ! EXPRESSION
|
|
invert EXPORESSION
|
|
.TP
|
|
.B \-b FILE
|
|
FILE exists and is block special
|
|
.TP
|
|
.B \-c FILE
|
|
FILE exists and is character special
|
|
.TP
|
|
.B \-d FILE
|
|
FILE exists and is a directory
|
|
.TP
|
|
.B \-e FILE
|
|
FILE exists
|
|
.TP
|
|
.B \-f FILE
|
|
ILE exists and is a regular file
|
|
.TP
|
|
.B \-g FILE
|
|
FILE exists and is set-group-ID
|
|
.TP
|
|
.B \-k FILE
|
|
FILE exists and its sticky bit is set
|
|
.TP
|
|
.B \-h FILE
|
|
FILE exists and is a symbolic link (same as -L)
|
|
.TP
|
|
.B \-L FILE
|
|
FILE exists and is a symbolic link (same as -h)
|
|
.TP
|
|
.B \-n STRING
|
|
the length of STRING is nonzero
|
|
.TP
|
|
.B \-p FILE
|
|
FILE exists and is a named pipe
|
|
.TP
|
|
.B \-r FILE
|
|
FILE exists and read permission is granted
|
|
.TP
|
|
.B \-S FILE
|
|
FILE exists and is a socket
|
|
.TP
|
|
.B \-s FILE
|
|
FILE exists and has a size greater than zero
|
|
.TP
|
|
.B \-t FD
|
|
file descriptor FD is opened on a terminal
|
|
.TP
|
|
.B \-u FILE
|
|
exists and its set-user-ID bit is set
|
|
.TP
|
|
.B \-w FILE
|
|
FILE exists and write permission is granted
|
|
.TP
|
|
.B \-x FILE
|
|
FILE exists and execute (or search) permission is granted
|
|
.TP
|
|
.B \-z STRING
|
|
the length of STRING is zero
|
|
.TP
|
|
.B s1 = s2
|
|
True if the strings s1 and s2 are identical
|
|
.TP
|
|
.B s1 != s2
|
|
True if the strings s1 and s2 are not identical
|
|
.TP
|
|
.B s1
|
|
True if s1 is not the null string
|
|
.TP
|
|
.B n1 -eq n2
|
|
True if the integers n1 and n2 are equal
|
|
.TP
|
|
.B n1 -ne n2
|
|
True if the integers n1 and n2 are not equal
|
|
.TP
|
|
.B n1 -gt n2
|
|
True if the integer n1 is greater than the integer n2
|
|
.TP
|
|
.B n1 -ge n2
|
|
True if the integer n1 is great than or equal to the integer n2
|
|
.TP
|
|
.B n1 -lt n2
|
|
True if the integer n1 is less than the integer n2
|
|
.TP
|
|
.B n1 -le n2
|
|
True if the integer n1 is less than or equal to the integer n2 |