Rework test.1

The previous version was not well-searchable and a bit too harsh
on emphasized text segments.
This version should improve that.
This commit is contained in:
FRIGN 2015-02-10 00:33:21 +01:00
parent 22f868cf0b
commit 4d32205c2d
1 changed files with 69 additions and 26 deletions

95
test.1
View File

@ -1,4 +1,4 @@
.Dd February 9, 2015 .Dd February 10, 2015
.Dt TEST 1 .Dt TEST 1
.Os sbase .Os sbase
.Sh NAME .Sh NAME
@ -14,52 +14,95 @@ returns the status of the
.Sh OPTIONS .Sh OPTIONS
.Bl -tag -width Ds .Bl -tag -width Ds
.It Sy ! Ar expression .It Sy ! Ar expression
.Sy invert invert
.Ar expression . .Ar expression .
.It Sy -(e | s) Ar file .It ( Fl e | Fl s ) Ar file
.Ar file .Ar file
.Sy exists exists and has (any size
and has .Op Fl e
.Sy arbitrary size | size greater than zero . | non-zero size
.It Sy -(f | d | p | hL | S | b | c) Ar file .Op Fl s ) .
.It Sy ( Fl f | Fl d | Fl p | Fl hL | Fl S | Fl b | Fl c ) Ar file
.Ar file .Ar file
.Sy exists exists and is a
and is (regular file
.Sy regular file | directory | named pipe | symbolic link | socket | block special | character special . .Op Fl f
.It Sy -(k | g | u | r | w | x) Ar file | directory
.Op Fl d
| named pipe
.Op Fl p
| symbolic link
.Op Fl h | Fl L
| socket
.Op Fl S
| block special
.Op Fl b
| character special
.Op Fl c ) .
.It Sy ( Fl k | Fl g | Fl u | Fl r | Fl w | Fl x ) Ar file
.Ar file .Ar file
.Sy exists exists and has
and is .Xr ( sticky 1
.Sy sticky(1) | setgid(2) | setuid(4) | readable | writable | executable (or searchable) . .Op Fl k
|
.Xr setgid 2
.Op Fl g
|
.Xr setuid 4
.Op Fl u
|
.Xr read 4
.Op Fl r
|
.Xr write 2
.Op Fl w
|
.Xr execute 1
.Op Fl x )
permissions.
.It Fl t Ar fd .It Fl t Ar fd
.Ar fd .Ar fd
as a file descriptor is as a file descriptor is associated with a terminal.
.Sy associated with a terminal .
.It Ar string .It Ar string
True if True if
.Ar string .Ar string
is is not the null string.
.Sy not the null string . .It Sy ( Fl z | Fl n ) Ar string
.It Sy -(z | n) Ar string
True if True if
.Ar string .Ar string
has has (zero
.Sy zero | non-zero .Op Fl z
| non-zero
.Op Fl n )
length. length.
.It Ar s1 Sy (= | !=) Ar s2 .It Ar s1 Sy ( = | != ) Ar s2
True if strings True if strings
.Ar s1 .Ar s1
and and
.Ar s2 .Ar s2
are are
.Sy identical | different . (identical
.It Ar n1 Sy -(eq | ne | gt | ge | le | lt) Ar n2 .Oo Sy = Oc
| different
.Oo Sy != Oc ) .
.It Ar n1 Sy ( Fl eq | Fl ne | Fl gt | Fl ge | Fl le | Fl lt ) Ar n2
True if integers True if integers
.Ar n1 .Ar n1
and and
.Ar n2 .Ar n2
are are (=
.Sy = | != | > | >= | <= | < . .Op Fl eq
| !=
.Op Fl ne
| >
.Op Fl gt
| >=
.Op Fl ge
| <=
.Op Fl le
| <
.Op Fl lt ) .
.El
.Sh EXIT STATUS .Sh EXIT STATUS
.Bl -tag -width Ds .Bl -tag -width Ds
.It 0 .It 0