41 lines
1.6 KiB
Plaintext
41 lines
1.6 KiB
Plaintext
|
TEST(1) User Commands TEST(1)
|
||
|
|
||
|
NAME
|
||
|
test - return the result of a logical expression
|
||
|
|
||
|
SYNOPSIS
|
||
|
test [parm1] operator parm2
|
||
|
|
||
|
DESCRIPTION
|
||
|
Test will evaluate the expression given by the command-line arguments,
|
||
|
and return 0 if the result is true, or 1 if the result is false. The
|
||
|
operators are as follows:
|
||
|
|
||
|
-e parm2 - Named file exists
|
||
|
-f parm2 - Is a regulare file
|
||
|
-d parm2 - Is a directory
|
||
|
parm1 = parm2 - Determine if the two strings are equal
|
||
|
parm1 != parm2 - Determine if the two strings are not equal
|
||
|
parm1 < parm2 - Determine if the parm1 is alphabetically before parm2
|
||
|
parm1 > parm2 - Determine if the parm1 is alphabetically after parm2
|
||
|
-z parm2 - Test if parm2 is null
|
||
|
-n parm2 - Test if parm2 is not null
|
||
|
parm1 -eq parm2 - parm1 is numerically equal to parm2
|
||
|
parm1 -ne parm2 - parm1 is numerically not equal to parm2
|
||
|
parm1 -gt parm2 - parm1 is numerically greater than parm2
|
||
|
parm1 -ge parm2 - parm1 is numerically greater than or equal to parm2
|
||
|
parm1 -lt parm2 - parm1 is numerically less than parm2
|
||
|
parm1 -le parm2 - parm1 is numerically less than or equal to parm2
|
||
|
|
||
|
AUTHOR
|
||
|
Dave Hein
|
||
|
|
||
|
COPYRIGHT
|
||
|
Copyright (c) 2013 Dave Hein
|
||
|
MIT License (See license.txt in the root directory)
|
||
|
This is free software: you are free to change and redistribute it.
|
||
|
There is no warranty, to the extent permitted by law.
|
||
|
|
||
|
|
||
|
SPINIX utility October 2013 TEST(1)
|