16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

[[ test_expr ]]<br />

The double-square-bracket command ([[ test_expr ]]) is a command that<br />

returns an exit status indicating whether the test_expr (test expression) is<br />

true or false.<br />

Word-splitting and wildcard expansion (filename expansion or globbing) are<br />

not done within [[ ]]. This makes quoting less necessary than when you use<br />

the test (or [ ]) command. Alias expansion is also not done within [[ ]].<br />

The following primitives are used in ([[ test_expr ]]). Spaces or tabs are<br />

required to separate operators from operands.<br />

–a file True if file exists (–e is recommended to avoid confusion with the<br />

test command syntax)<br />

–Aa file<br />

True if file has an extended access ACL entry.<br />

–Ad file<br />

True if file has a directory default ACL.<br />

–Af file<br />

True if file has a file default ACL.<br />

–b file True if file is a block special file (block special files are not<br />

supported in z/<strong>OS</strong>)<br />

–B file<br />

True if the file is tagged as binary (not text)<br />

–c file True if file is a character special file<br />

–d file True if file is a directory<br />

–e file True if file exists<br />

–Ea file<br />

True if the file has the APF extended attribute<br />

–El file<br />

True if the file has the shared library extended attribute<br />

–Ep file<br />

True if the file has the program control extended attribute<br />

–Es file<br />

True if the file has the shared address space extended attribute<br />

–f file True if file is an ordinary file<br />

–g file True if the set-group-ID attribute of file is on<br />

–G file<br />

True if file group owner is the effective group id<br />

–h file True if file is a symbolic link<br />

–k file True if file has the ″sticky″ bit on<br />

–L file True if file is a symbolic link<br />

-Ma file<br />

True if the file has any Multilevel Security seclabel<br />

–n string<br />

True if the length of the string is greater than zero<br />

sh<br />

Chapter 2. Shell command descriptions 553

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!