09.06.2013 Views

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

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.

csh: C Shell <strong>XENIX</strong> Programming<br />

The source command is used to cause the current C shell to read commands from a file<br />

until the end of the file. Thus<br />

source .cshrc<br />

can be used after editing in a change to the .cshrc file that you wish to take effect<br />

before the next time you log in.<br />

The time command is used to cause a command to be timed no matter how much CPU<br />

time it takes. Thus<br />

displays<br />

Similarly<br />

displays<br />

time cp /e<strong>tc</strong>/rc /usr/bi 11/rc<br />

O.Ou 0.15 0:01 8%<br />

time we /e<strong>tc</strong>/rc /usr/bi 11/rc<br />

52 178 1347 /e<strong>tc</strong>/rc<br />

52 178 1347 /usr/bi 1 1/rc<br />

104 356 2694 total<br />

0.1 u 0.15 0:00 13%<br />

This indicates that the cp command used a negligible amount of user time (u) and about<br />

one-tenth of a second system time (s); the elapsed time was one second (0:0 1). The word<br />

count command we used 0.1 seconds of user time and 0.1 seconds of system time in less<br />

than a second of elapsed time. The percentage "13%" indicates that over the period<br />

when it was active the we command used an average of 13 percent of the available CPU<br />

cycles of the machine.<br />

The unalias and unset commands are used to remove aliases and variable definitions<br />

from the C shell. The command unsetenv removes variables from the environment.<br />

Creating Command Scripts<br />

You can place commands in files and cause C shells to be invoked to read and execute<br />

commands from these files, which are called C shell scripts. This section describes the<br />

C shell features that are useful when creating C shell scripts.<br />

8-10

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

Saved successfully!

Ooh no, something went wrong!