Near Matches
Ignore Exact
Everything
2
-s (thing)
See all of -s
, there is 1 more in this node.
(
thing
)
by
ariels
Mon Jul 15 2002 at 10:06:47
(
UN*X
shell programming
,
test
,
[
:)
The test -s
filename
tests whether
filename
exists
and has a
nonzero
size. For instance:
if
[ -s
$f
];
then
echo
"$f is non-empty!"
fi
with the
Bourne shell
or a compatible.
(
Perl
:)
Borrowing from the aforementioned usage in the shell, the test -s
filename
return
s
the
size
of
filename
, or
undef
if it does not exist. In particular, if you use it as a test, since
0 is false
too, you get precisely the shell's test behaviour:
print
"$f is non-empty!\n" if -s $f;
-'s
s///
[
-ed
Hollywood Stock Exchange
's
test
Dragon Strike
filename
Inextricableness
plural
Perl