<s>
test	O
is	O
a	O
command-line	B-Application
utility	O
found	O
in	O
Unix	B-Application
,	O
Plan	B-Operating_System
9	I-Operating_System
,	O
and	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
that	O
evaluates	O
conditional	B-Language
expressions	I-Language
.	O
</s>
<s>
test	O
was	O
turned	O
into	O
a	O
shell	O
builtin	O
command	B-Application
in	O
1981	O
with	O
UNIX	B-Operating_System
System	I-Operating_System
III	I-Operating_System
and	O
at	O
the	O
same	O
time	O
made	O
available	O
under	O
the	O
alternate	O
name	O
[	O
.	O
</s>
<s>
The	O
test	O
command	B-Application
in	O
Unix	B-Application
evaluates	O
the	O
expression	O
parameter	O
.	O
</s>
<s>
In	O
the	O
second	O
form	O
of	O
the	O
command	B-Application
,	O
the	O
[	O
]	O
(	O
brackets	O
)	O
must	O
be	O
surrounded	O
by	O
blank	O
spaces	O
(	O
this	O
is	O
because	O
[	O
is	O
a	O
program	O
and	O
POSIX	O
compatible	O
shells	O
require	O
a	O
space	O
between	O
the	O
program	O
name	O
and	O
its	O
arguments	O
)	O
.	O
</s>
<s>
One	O
must	O
test	O
explicitly	O
for	O
file	O
names	O
in	O
the	O
C	B-Operating_System
shell	I-Operating_System
.	O
</s>
<s>
File-name	O
substitution	O
(	O
globbing	B-Language
)	O
causes	O
the	O
shell	O
script	O
to	O
exit	O
.	O
</s>
<s>
The	O
test	O
command	B-Application
is	O
not	O
to	O
be	O
confused	O
with	O
the	O
[ [ 	O
reserved	O
word	O
that	O
was	O
introduced	O
with	O
ksh88	B-Language
.	O
</s>
<s>
The	O
latter	O
is	O
not	O
a	O
command	B-Application
but	O
part	O
of	O
the	O
ksh88	B-Language
syntax	O
and	O
does	O
not	O
apply	O
file-name	O
substitution	O
to	O
glob	B-Language
expressions	O
.	O
</s>
<s>
The	O
version	O
of	O
test	O
bundled	O
in	O
GNU	B-Application
coreutils	I-Application
was	O
written	O
by	O
Kevin	O
Braunsdorf	O
and	O
Matthew	O
Bradburn	O
.	O
</s>
<s>
The	O
command	B-Application
is	O
available	O
as	O
a	O
separate	O
package	O
for	O
Microsoft	B-Application
Windows	I-Application
as	O
part	O
of	O
the	O
UnxUtils	B-Application
collection	O
of	O
native	B-Language
Win32	B-Library
ports	O
of	O
common	O
GNU	B-Operating_System
Unix-like	B-Operating_System
utilities	O
.	O
</s>
<s>
The	O
command	B-Application
has	O
also	O
been	O
ported	O
to	O
the	O
IBM	B-Application
i	I-Application
operating	O
system	O
.	O
</s>
<s>
If	O
the	O
specified	O
file	O
exists	O
and	O
is	O
a	O
directory	B-Application
,	O
the	O
True	O
exit	O
value	O
indicates	O
that	O
the	O
current	O
process	O
has	O
permission	O
to	O
change	O
cd	O
into	O
the	O
directory	B-Application
.	O
</s>
<s>
Non	O
standard	O
Korn	B-Language
Shell	I-Language
extensions	O
:	O
</s>
<s>
In	O
Perl	B-Language
,	O
these	O
sections	O
are	O
reversed	O
:	O
eq	O
is	O
a	O
string	O
operator	O
and	O
==	O
is	O
a	O
numerical	O
operator	O
,	O
and	O
so	O
on	O
for	O
the	O
others	O
.	O
</s>
<s>
This	O
command	B-Application
returns	O
the	O
following	O
exit	O
values	O
:	O
</s>
<s>
If	O
the	O
file	O
specified	O
by	O
the	O
first	O
positional	O
parameter	O
to	O
the	O
shell	O
procedure	O
,	O
$1	O
,	O
does	O
not	O
exist	O
or	O
is	O
of	O
size	O
0	O
,	O
the	O
test	O
command	B-Application
displays	O
the	O
message	O
.	O
</s>
<s>
If	O
$1	O
exists	O
and	O
has	O
a	O
size	O
greater	O
than	O
0	O
,	O
the	O
test	O
command	B-Application
displays	O
nothing	O
.	O
</s>
<s>
If	O
the	O
quotation	O
marks	O
are	O
omitted	O
and	O
$1	O
is	O
the	O
empty	O
string	O
,	O
the	O
test	O
command	B-Application
displays	O
the	O
error	O
message	O
:	O
</s>
<s>
The	O
special	O
shell	O
variable	O
$#	O
represents	O
the	O
number	O
of	O
positional	O
parameters	O
entered	O
on	O
the	O
command	B-Application
line	I-Application
that	O
starts	O
this	O
shell	O
procedure	O
.	O
</s>
