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.

sh<br />

number&−<br />

Closes output descriptor number. If you omit number, it closes the standard<br />

output.<br />

Normally, redirection applies only to the command where the redirection construct<br />

appears; however, see exec.<br />

The order of redirection specifications is significant, since an earlier redirection can<br />

affect a later one. However, these specifications can be freely intermixed with other<br />

command arguments. Since the shell takes care of the redirection, the redirection<br />

constructs are not passed to the command itself.<br />

Note: The shell performs the implicit redirections needed for pipelines before<br />

performing any explicit redirections.<br />

Filename Generation<br />

The characters * ? [ are called glob characters, or wildcardcharacters. If an<br />

unquoted argument contains one or more glob characters, the shell processes the<br />

argument for filename generation. The glob characters are part of glob patterns,<br />

whichrepresent file and directory names. These patterns are similar to regular<br />

expressions, but differ in syntax, since they are intended to match filenames and<br />

words (not arbitrary strings). The special constructions that may appear in glob<br />

patterns are:<br />

? Matches exactly one character of a filename, except for the separator<br />

character / and a . at the beginning of a filename. ? only matches an<br />

actual filename character and does not match nonexistent characters at the<br />

end of the filename. ? is analogous to the metacharacter . in regular<br />

expressions.<br />

* Matches zero or more characters in a filename, subject to the same<br />

restrictions as ?. * is analogous to the regular expression .*.<br />

[chars]<br />

Defines a class of characters; the glob pattern matches any single<br />

character in the class. A class can contain a range of characters by writing<br />

the first character in the range, a dash −, and the last character. For<br />

example, [A−Za−z], in the P<strong>OS</strong>IX locale, stands for all the uppercase and<br />

lowercase letters. If you want a literal − character (or other glob character)<br />

in the class, use the backslash to escape the character, causing it to lose<br />

it’s special meaning within the pattern expression. If the first character<br />

inside the brackets is an exclamation mark (!), the pattern matches any<br />

single character that is not in the class.<br />

Some sample patterns are:<br />

[!a-f]*.c<br />

Matches all .c files beginning with something other than the letters from a<br />

through f.<br />

/???/?.?<br />

Matches all files that are under the root directory in a directory with a<br />

three-letter name, and that have a basename containing one character<br />

followed by a . followed by another single character.<br />

566 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

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

Saved successfully!

Ooh no, something went wrong!