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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

sed<br />

Related Information<br />

awk, diff, ed, grep, vi<br />

See Appendix C for more information about regexp.<br />

set — Set or unset command options and positional parameters<br />

Format<br />

Description<br />

set [±abCefhiKkLmnPpstuvx–] [±o[flag]] [±Aname][parameter ...]<br />

tcsh shell:<br />

1. set [-r]<br />

2. set [-r] name ...<br />

3. set [-r] name=word ...<br />

4. set [-r] [-f|-l] name=(wordlist) ...<br />

5. set name[index]=word ...<br />

Calling set without arguments displays the names and values of all shell variables,<br />

sorted by name, in the following format:<br />

Variable="value"<br />

The quoting allows the output to be reinput to the shell using the built-in command<br />

eval. Arguments of the form –option set each shell flag specified as an option.<br />

Similarly, arguments of the form +option turn off each of the shell flags specified as<br />

an option. (Contrary to what you might expect, – means on, and + means off.)<br />

Note: All of the set options except ±A, –s, –, and –– are shell flags. Shell flags can<br />

also be set on the sh command line at invocation.<br />

set in the tcsh shell<br />

tcsh shell: See format section to view the forms described below.<br />

1. The first form of the command prints the value of all shell variables. Variables<br />

which contain more than a single word print as a parenthesized word list.<br />

Variables which are read-only will only be displayed by using the -r option. For<br />

forms 2, 3 and 4, if -r is specified, the value is set to read-only.<br />

2. The second form sets name to the null string.<br />

3. The third form sets name to the single word.<br />

4. The fourth form sets name to the list of words in wordlist. In all cases the value<br />

is command and filename expanded. If -f or -l is specified, set only unique<br />

words keeping their order. -f prefers the first occurrence of a word, and -l the<br />

last.<br />

5. The fifth form sets the index’th component of name to word; this component<br />

must already exist.<br />

These arguments can be repeated to set and/or make read-only multiple variables<br />

in a single set command. However, variable expansion happens for all arguments<br />

before any setting occurs. Also, ’=’ can be adjacent to both name and word or<br />

separated from both by whitespace, but cannot be adjacent to only one or the other.<br />

For example:<br />

set -r name=word and set -r name = word<br />

540 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!