Intel XENIX 286 Programmers Guide (86) - Tenox.tc
Intel XENIX 286 Programmers Guide (86) - Tenox.tc Intel XENIX 286 Programmers Guide (86) - Tenox.tc
XENIX Programming Programming Commands csh (continued) if (expr) then else if (expr2) then else end if logout If the specified expr is true, then the commands to the first else are executed; else if expr2 is true, then the commands to the second else are executed, etc. Any number of else-if pairs are possible; only one endif is needed. The else part is likewise optional. (The words else and endif must appear at the beginning of input lines; the if must appear alone on its input line or after $IR else.) Terminates a login shell. The only way to log out if ignoreeof is set. nice nice +number nice command nice +number command The first form sets the nice for this shell to 4. The second form sets the nice to the given number. The final two forms run command at priority 4 and number, respectively. With "nice -number •••• " the super-user may increase the priority by reducing the priority number. The command is always executed in a subshell, and the restrictions placed on commands in simple if statements apply. nohup nohup command The first form can be used in shell scripts to cause hangups to be ignored for the remainder of the script. The second form causes the specified command to be run with hangups ignored. Unless the shell is running detached, nohup has no effect. All processes detached with & are automatically nohuped. (Thus, nohup is not really needed.) onintr onintr onintr label Controls the action of the shell on interrupts. The first form restores the default action of the shell on interrupts, which is to terminate shell scripts or to return to the terminal command input level. The second form onintr- causes all interrupts to be ignored. The final form causes the shell to execute a goto label when an interrupt is received or a child process terminates because it was interrupted. In any case, if the shell is running detached and interrupts are being ignored, no forms of onintr have meaning, and interrupts continue to be ignored by the shell and all invoked commands. B-47
Programming Commands XENIX Programming csh (continued) rehash Causes the internal hash table of the contents of the directories in the path variable to be recomputed. This is needed if new commands are added to directories in the path while you are logged in. This should be necessary only if you add commands to one of your own directories or if a systems programmer changes the contents of one of the system directories. repeat count command The specified command, which is subject to the same restrictions as the command in this one-line if statement, is executed count times. 1/0 redirections occur exactly once, even if count is 0. set set name set nam e=word set name[index]=word set name=(wordlist) The first form of the command shows the value of all shell variables. Variables that have a value other than a single word print as a parenthesized word list. The second form sets name to the null string. The third form sets name to the single word. The fourth form sets the indexth component of name to word; this component must already exist. The final form sets name to the list of words in wordlist. In all cases, the value is command- and file-name-expanded. These arguments may be repeated to set multiple values in a single set command. Note however, that variable expansion happens for all arguments before any setting occurs. setenv name value Sets the value of the environment variable name to be value, a single string. Useful environment variables are TERM, the type of terminal you are using, and SHELL, the shell you are using. shift shift variable The members of argv are shifted to the left, discarding argv[l]. It is an error for argv not to be set or to have less than one word as value. The second form performs the same function on the specified variable. source name The shell reads commands from name. source commands may be nested. If they are nested too deeply, the shell may run out of file descriptors. An error in a source at any level terminates all nested source commands. Input during source commands is never placed on the history list. B-48
- Page 261 and 262: C Language Portability XENIX Progra
- Page 263 and 264: C Language Portability XENIX Progra
- Page 266 and 267: APPENDIX B PROG RAMMING COMMANDS Th
- Page 268 and 269: XENIX Programming ad b (continued)
- Page 270 and 271: XENIX Programming Programming Comma
- Page 272 and 273: XENIX Programming Programming Comma
- Page 274 and 275: XENIX Programming Programming Comma
- Page 276 and 277: XENIX Programming Programming Comma
- Page 278 and 279: XENIX Programming Programming Comma
- Page 280 and 281: XENIX Programming Programming Comma
- Page 282 and 283: XENIX Programming Programming Comma
- Page 284 and 285: XENIX Programming as (continued) Fi
- Page 286 and 287: XENIX Programming Programming Comma
- Page 288 and 289: XENIX Programming Programming Comma
- Page 290 and 291: XENIX Programming Programm ing Comm
- Page 292 and 293: XENIX Programming Programming Comma
- Page 294 and 295: XENIX Programming Programming Comma
- Page 296 and 297: XENIX Programming Programm ing Comm
- Page 298 and 299: XENIX Programming Programming Comma
- Page 300 and 301: XENIX Programming Programming Comma
- Page 302 and 303: XENIX Programming Programming Comma
- Page 304 and 305: XENIX Programming Programming Comma
- Page 306 and 307: XENIX Programming Programming Comma
- Page 308 and 309: XENIX Programming Programming Comma
- Page 310 and 311: XENIX Programming Programming Comma
- Page 314 and 315: XENIX Programm ing Programming Comm
- Page 316 and 317: XENIX Programming Programming Comma
- Page 318 and 319: XENIX Programming Programming Comma
- Page 320 and 321: XENIX Programming Programming Comma
- Page 322 and 323: XENIX Programming Programming Comma
- Page 324 and 325: XENIX Programming Programming Comma
- Page 326 and 327: XENIX Programming Programming Comma
- Page 328 and 329: XENIX Programming Programming Comma
- Page 330 and 331: XENIX Programming Programming Comma
- Page 332 and 333: XENIX Programming Programming Comma
- Page 334 and 335: XENIX Programming Programming Comma
- Page 336 and 337: XENIX Programming Programming Comma
- Page 338 and 339: XENIX Programming Programming Comma
- Page 340 and 341: XENIX Programming Programming Comma
- Page 342 and 343: XENIX Programming Programming Comma
- Page 344 and 345: XENIX Programming lex (continued) E
- Page 346 and 347: XENIX Programming Programming Comma
- Page 348 and 349: XENIX Programming Programming Comma
- Page 350 and 351: XENIX Programming Programming Comma
- Page 352 and 353: XENIX Programming Programming Comma
- Page 354 and 355: XENIX Programming Programming Comma
- Page 356 and 357: XENIX Programming Programming Comma
- Page 358 and 359: XENIX Programming Programming Comma
- Page 360 and 361: XENIX Programm ing Programming Comm
Programming Commands <strong>XENIX</strong> Programming<br />
csh (continued)<br />
rehash<br />
Causes the internal hash table of the contents of the directories in the path<br />
variable to be recomputed. This is needed if new commands are added to<br />
directories in the path while you are logged in. This should be necessary only if<br />
you add commands to one of your own directories or if a systems programmer<br />
changes the contents of one of the system directories.<br />
repeat count command<br />
The specified command, which is subject to the same restrictions as the<br />
command in this one-line if statement, is executed count times. 1/0<br />
redirections occur exactly once, even if count is 0.<br />
set<br />
set name<br />
set nam e=word<br />
set name[index]=word<br />
set name=(wordlist)<br />
The first form of the command shows the value of all shell variables. Variables<br />
that have a value other than a single word print as a parenthesized word list.<br />
The second form sets name to the null string. The third form sets name to the<br />
single word. The fourth form sets the indexth component of name to word; this<br />
component must already exist. The final form sets name to the list of words in<br />
wordlist. In all cases, the value is command- and file-name-expanded. These<br />
arguments may be repeated to set multiple values in a single set command.<br />
Note however, that variable expansion happens for all arguments before any<br />
setting occurs.<br />
setenv name value<br />
Sets the value of the environment variable name to be value, a single string.<br />
Useful environment variables are TERM, the type of terminal you are using, and<br />
SHELL, the shell you are using.<br />
shift<br />
shift variable<br />
The members of argv are shifted to the left, discarding argv[l]. It is an error<br />
for argv not to be set or to have less than one word as value. The second form<br />
performs the same function on the specified variable.<br />
source name<br />
The shell reads commands from name. source commands may be nested. If they<br />
are nested too deeply, the shell may run out of file descriptors. An error in a<br />
source at any level terminates all nested source commands. Input during source<br />
commands is never placed on the history list.<br />
B-48