1 .\" Copyright (c) 1980, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)csh.g 8.1 (Berkeley) 6/8/93
33 .\" $FreeBSD: src/bin/csh/USD.doc/csh.g,v 1.5.2.2 2003/01/24 02:08:54 keramida Exp $
38 This glossary lists the most important terms introduced in the
40 shell and gives references to sections of the shell
41 document for further information about them.
42 References of the form
44 indicate that the command
46 is in the \s-2UNIX\s0 User Reference manual in section 1.
47 You can look at an online copy of its manual page by doing
51 References of the form (2.5)
52 indicate that more information can be found in section 2.5 of this
55 Your current directory has the name `.' as well as the name printed
60 The current directory `.' is usually the first
62 of the search path contained in the variable
64 thus commands which are in `.' are found first (2.2).
65 The character `.' is also used in separating
69 The character `.' at the beginning of a
73 is treated specially and not matched by the
74 .I "filename expansion"
75 metacharacters `?', `*', and `[' `]' pairs (1.6).
77 Each directory has a file `..' in it which is a reference to its
79 After changing into the directory with
85 you can return to the parent directory by doing
89 The current directory is printed by
93 Compilers which create executable images create them, by default, in the
96 for historical reasons (2.3).
97 .IP "absolute pathname"
101 which begins with a `/' is
103 since it specifies the
105 of directories from the beginning
106 of the entire directory system \- called the
115 .I "relative pathname" )
120 specifies a shorter or different name for a \s-2UNIX\s0
121 command, or a transformation on a command to be performed in
123 The shell has a command
127 and can print their current values.
134 Commands in \s-2UNIX\s0 receive a list of
145 words `a', `b' and `c'.
152 of the command (1.1).
154 The list of arguments to a command written in the shell language
155 (a shell script or shell procedure) is stored in a variable called
158 This name is taken from the conventional name in the
159 C programming language (3.4).
161 Commands started without waiting for them to complete are called
165 A filename is sometimes thought of as consisting of a
167 part, before any `.' character, and an
174 (1.6) and basename (1).
180 job to continue execution in the
184 A directory containing binaries of programs and shell scripts to be
185 executed is typically called a
190 directories are `/bin' containing the most
191 heavily used commands and `/usr/bin' which contains most other user
193 Programs developed at UC Berkeley live in `/usr/ucb', while locally
194 written programs live in `/usr/local'. Games are kept in the directory
196 You can place binaries in any directory.
197 If you wish to execute them often, the name of the directories
204 is a builtin command used to exit from loops within the control
205 structure of the shell (3.7).
209 builtin command is used to exit from a
211 control structure, like a
213 exits from loops (3.7).
215 A command executed directly by the shell is called a
218 Most commands in \s-2UNIX\s0 are not built into the shell,
219 but rather exist as files in
222 These commands are accessible because the directories in which
223 they reside are named in the
229 command is used as a label in a
231 statement in the shell's control structure, similar to that of the
233 Details are given in the shell documentation `csh (1)' (3.7).
237 program catenates a list of specified files on the
238 .I "standard output" .
239 It is usually used to look at the contents of a single file on the terminal,
240 to `cat a file' (1.8, 2.3).
244 command is used to change the
245 .I "working directory" .
249 .I "working directory"
252 directory (2.4, 2.7).
256 command is a synonym for
259 is usually used because it is easier to type.
263 command is used to change the shell which you use on \s-2UNIX\s0.
264 By default, you use a different version of the shell
265 which resides in `/bin/sh'.
266 You can change your shell to `/bin/csh' by doing
268 chsh your-login-name /bin/csh
274 It is only necessary to do this once.
275 The next time you log in to \s-2UNIX\s0 after doing this command,
278 rather than the shell in `/bin/sh' (1.9).
281 is a program which compares files.
282 It is usually used on binary files, or to see if two files are identical (3.6).
283 For comparing text files the program
285 described in `diff (1)' is used.
287 A function performed by the system, either by the shell
290 or by a program residing in a file in
291 a directory within the \s-2UNIX\s0 system, is called a
296 When a command is issued, it consists of a
298 which is the first word of the command,
299 followed by arguments.
300 The convention on \s-2UNIX\s0 is that the first word of a
301 command names the function to be performed (1.1).
302 .IP "command substitution"
304 The replacement of a command enclosed in `\`' characters
305 by the text output by that command
307 .I "command substitution"
312 between `/' characters is called a
317 which has multiple strings as value is said to have
324 A builtin command which causes execution of the enclosing
328 loop to cycle prematurely.
331 command in the programming language C (3.6).
333 Certain special characters, called
335 characters, are produced by holding down the \s-2CONTROL\s0 key
336 on your terminal and simultaneously pressing another character, much like
337 the \s-2SHIFT\s0 key is used to produce upper case characters. Thus
339 is produced by holding down the \s-2CONTROL\s0 key while pressing the
340 `c' key. Usually \s-2UNIX\s0 prints a caret (^) followed by the
341 corresponding letter when you type a
343 character (e.g. `^C' for
347 When a program terminates abnormally, the system places an image
348 of its current state in a file named `core'.
351 can be examined with the system debugger `adb (1)'
352 or `sdb (1)' in order to determine what went wrong with the program (1.8).
353 If the shell produces a message of the form
355 Illegal instruction (core dumped)
357 (where `Illegal instruction' is only one of several possible
358 messages), you should report this to the author of the program
359 or a system administrator,
360 saving the `core' file.
364 (copy) program is used to copy the contents of one file into another
366 It is one of the most commonly used \s-2UNIX\s0 commands (1.6).
368 The name of the shell
369 program that this document describes.
375 directory is read by each shell as it begins execution.
376 It is usually used to change the setting of the variable
380 parameters which are to take effect globally (2.1).
384 variable in the shell holds the
385 .I "absolute pathname"
387 .I "working directory" \&.
388 It is changed by the shell whenever your current
389 .I "working directory"
390 changes and should not be changed otherwise (2.2).
394 command prints the current date and time (1.3).
397 is the process of correcting mistakes in programs and shell scripts.
398 The shell has several options and variables which may be used
407 statements, as it is in the C language
408 to label the code to be executed if none of the
410 labels matches the value switched on (3.7).
416 key on the terminal normally causes an interrupt to be sent to the current job.
417 Many users change the interrupt character to be ^C.
419 A command that continues running in the
421 after you logout is said to be
424 An error message produced by a program is often referred to as a
426 Most error messages are not written to the
427 .I "standard output" ,
428 since that is often directed away from the terminal (1.3, 1.5).
429 Error messsages are instead written to the
430 .I "diagnostic output"
431 which may be directed away from the terminal, but usually is not.
434 will usually appear on the terminal (2.5).
436 A structure which contains files.
437 At any time you are in one particular
439 whose names can be printed by the command
443 command will change you to another
450 in which you are when you first login is your
452 directory (1.1, 2.7).
453 .IP "directory\ stack"
454 The shell saves the names of previous
455 .I "working directories"
458 when you change your current
459 .I "working directory"
464 can be printed by using the
466 command, which includes your current
467 .I "working directory"
468 as the first directory name on the left (2.7).
472 command prints the shell's
478 command is a program (described in `du (1)') which
479 prints the number of disk blocks is all directories below
480 and including your current
481 .I "working directory"
486 command prints its arguments (1.6, 3.6).
490 command is part of the `if-then-else-endif' control
491 command construct (3.6).
495 statement is ended with the word
497 all lines following the
499 up to a line starting with the word
503 are executed if the condition between parentheses after the
508 .I "end\f1-\fPof\f1-\fPfile"
509 is generated by the terminal by a control-d,
510 and whenever a command reads to the end of a file which
511 it has been given as input.
512 Commands receiving input from a
515 .I "end\f1-\fPof\f1-\fPfile"
516 when the command sending them input completes.
517 Most commands terminate when they receive an
518 .I "end\f1-\fPof\f1-\fPfile" .
519 The shell has an option to ignore
520 .I "end\f1-\fPof\f1-\fPfile"
522 input which may help you keep from logging out accidentally
523 by typing too many control-d's (1.1, 1.8, 3.8).
525 A character `\e' used to prevent the special meaning of a metacharacter
528 the character from its special meaning.
533 will echo the character `*' while just
537 will echo the names of the file in the current directory.
541 There is also a non-printing character called
547 on terminal keyboards.
548 Some older \s-2UNIX\s0 systems use this character to indicate that
551 Most systems use control-s to stop the output and control-q to start it.
553 This file contains information about the accounts currently on the
555 It consists of a line for each account with fields separated by
556 `:' characters (1.8).
557 You can look at this file by saying
565 are often used to search for information in this file.
566 See `finger (1)', `passwd(5)', and `grep (1)' for more details.
570 command is used to force termination of a shell script,
571 and is built into the shell (3.9).
573 A command which discovers a problem may reflect this back to the command
574 (such as a shell) which invoked (executed) it.
575 It does this by returning a non-zero number as its
577 a status of zero being considered
578 `normal termination'.
581 command can be used to force a shell command script to give a non-zero
585 The replacement of strings in the shell input which contain metacharacters
586 by other strings is referred to as the process of
588 Thus the replacement of the word `*' by a sorted list of files
589 in the current directory is a `filename expansion'.
590 Similarly the replacement of the characters `!!' by the text of
591 the last command is a `history expansion'.
593 are also referred to as
598 are used in the shell
599 to control the conditional structures used in the writing of shell
600 scripts and in calculating values for these scripts.
601 The operators available in shell
603 are those of the language
606 Filenames often consist of a
610 separated by the character `.'.
611 By convention, groups of related files often share the same
614 Thus if `prog.c' were a C program, then the object file for this
615 program would be stored in `prog.o'.
616 Similarly a paper written with the
618 nroff macro package might be stored in
620 while a formatted version of this paper might be kept in
621 `paper.out' and a list of spelling errors in
636 Each file in \s-2UNIX\s0 has a name consisting of up to 14 characters
637 and not including the character `/' which is used in
641 do not begin with the character `.', and contain
642 only letters and digits with perhaps a `.' separating the
649 .IP "filename expansion"
651 .I "Filename expansion"
652 uses the metacharacters `*', `?' and `[' and `]'
653 to provide a convenient mechanism for naming files.
655 .I "filename expansion"
656 it is easy to name all the files in
657 the current directory, or all files which have a common
660 .I "filename expansion"
661 mechanisms use the metacharacter `~' and allow
662 files in other users' directories to be named easily (1.6, 4.2).
664 Many \s-2UNIX\s0 commands accept arguments which are not the names
665 of files or other users but are used to modify the action of the commands.
666 These are referred to as
668 options, and by convention consist of one or more letters preceded by
669 the character `\-' (1.2).
672 (list files) command has an option
673 `\-s' to list the sizes of files.
681 command is used in shell scripts and at the terminal to specify
682 repetition of a sequence of commands while the value of a certain
683 shell variable ranges through a specified list (3.6, 4.1).
685 When commands are executing in the normal way such that the
686 shell is waiting for them to finish before prompting for another
687 command they are said to be
690 .I "running in the foreground" \&.
691 This is as opposed to
694 jobs can be stopped by signals
695 from the terminal caused by typing different
696 control characters at the keyboard (1.8, 2.6).
698 The shell has a command
700 used in shell scripts to transfer control to a given label (3.7).
704 command searches through a list of argument files for a specified string.
707 grep bill /etc/passwd
709 will print each line in the file
711 which contains the string `bill'.
715 .I "regular expressions"
716 in the sense of the editors
717 `ed (1)' and `ex (1)'.
721 .I "regular expression"
726 command prints the first few lines of one or more files.
727 If you have a bunch of files containing text which you are wondering
728 about it is sometimes useful to run
730 with these files as arguments.
731 This will usually show enough of what is in these files to let you decide
732 which you are interested in (1.5).
735 is also used to describe the part of a
737 before and including the last `/' character. The
741 is the part after the last `/'. The `:h' and `:t' modifiers allow the
747 stored in a shell variable to be used (3.6).
751 mechanism of the shell allows previous commands to be repeated,
752 possibly after modification to correct typing mistakes or to change
753 the meaning of the command.
756 where these commands are kept, and a
758 variable which controls how large this list is (2.3).
759 .IP "home\ directory"
762 .I "home directory" ,
763 which is given in your entry
764 in the password file,
766 This is the directory which you are placed in when you first login.
771 command with no arguments takes you back to this directory, whose
772 name is recorded in the shell variable
774 You can also access the
775 .I "home directories"
776 of other users in forming
778 .I "filename expansion"
779 notation and the character `~' (1.6).
781 A conditional command within the shell, the
783 command is used in shell command scripts to make decisions
784 about what course of action to take next (3.6).
786 Normally, your shell will exit, printing
788 if you type a control-d at a prompt of `% '.
789 This is the way you usually log off the system.
794 variable if you wish in your
796 file and then use the command
799 This is useful if you sometimes accidentally type too many control-d
800 characters, logging yourself off
803 Many commands on \s-2UNIX\s0 take information from the terminal or from
804 files which they then act on.
805 This information is called
807 Commands normally read for
811 which is, by default, the terminal.
814 can be redirected from a file using a shell metanotation
815 with the character `<'.
816 Many commands will also read from a file specified as argument.
819 will read from the output of the previous
822 The leftmost command in a
824 reads from the terminal if
825 you neither redirect its
827 nor give it a filename to use as
828 .I "standard input" .
829 Special mechanisms exist for supplying input to commands in shell
834 is a signal to a program that is generated by typing ^C. (On older versions
835 of UNIX the \s-2RUBOUT\s0 or \s-2DELETE\s0 key were used for this purpose.)
836 It causes most programs to stop execution.
837 Certain programs, such as the shell and the editors,
840 in special ways, usually by stopping what they
841 are doing and prompting for another command.
842 While the shell is executing another command and waiting for it
843 to finish, the shell does not listen to
845 The shell often wakes up when you hit
847 because many commands
848 die when they receive an
853 typed on the same input line separated by `|' or `;' characters
854 are run together and are called a
856 Simple commands run by themselves without any `|' or `;' characters
867 The builtin functions that control the execution of
871 .I "bg, fg, stop, kill"
875 is started it is assigned a small number called a
877 which is printed next to the job in the output of the
879 command. This number, preceded by a `%' character, can be used as an argument
883 a specific job (2.6).
887 command prints a table showing
888 jobs that are either running in the
894 A command which sends a
896 to a job causing it to terminate (2.6).
902 directory is read by the shell each time you login to \s-2UNIX\s0
903 and the commands there are executed.
904 There are a number of commands which are usefully placed here,
907 commands to the shell itself (2.1).
909 The shell that is started on your terminal when you login is called
912 It is different from other shells which you may run (e.g. on
916 file before reading commands from the terminal and it reads the
918 file after you logout
923 command causes a login shell to exit.
924 Normally, a login shell will exit when you hit control-d
926 .I end\f1-\fPof\f1-\fPfile,
931 file then this will not work and you must use
933 to log off the \s-2UNIX\s0 system (2.8).
935 When you log off of \s-2UNIX\s0 the shell will execute commands from
940 directory after it prints `logout'.
944 is the line printer daemon.
945 The standard input of
947 spooled and printed on the \s-2UNIX\s0 line printer.
950 a list of filenames as arguments to be printed.
951 It is most common to use
953 as the last component of a
959 (list files) command is one of the most commonly used \s-2UNIX\s0
961 With no argument filenames it prints the names of the files in the
963 It has a number of useful
965 arguments, and can also be given the names of directories
966 as arguments, in which case it lists the names of the files in these
971 program is used to send and receive messages from other \s-2UNIX\s0
972 users (1.1, 2.1), whether they are logged on or not.
976 command is used to maintain one or more related files and to
977 organize functions to be performed on these files.
980 is easier to use, and more helpful than
981 shell command scripts (3.2).
983 The file containing commands for
993 often referred to is the
994 `\s-2UNIX\s0 manual'.
995 It contains 8 numbered sections with a description of each \s-2UNIX\s0
996 program (section 1), system call (section 2), subroutine (section 3),
997 device (section 4), special data structure (section 5), game (section 6),
998 miscellaneous item (section 7) and system administration program (section 8).
999 There are also supplementary documents (tutorials and reference guides)
1000 for individual programs which require explanation in more detail.
1001 An online version of the
1003 is accessible through the
1006 Its documentation can be obtained online via
1010 If you can't decide what manual page to look in, try the
1013 The supplementary documents are in subdirectories of /usr/doc.
1016 Many characters which are neither letters nor digits have special meaning
1017 either to the shell or to \s-2UNIX\s0.
1018 These characters are called
1020 If it is necessary to place these characters in arguments to commands
1021 without them having their special meaning then they must be
1025 is the character `>' which is used
1026 to indicate placement of output into a file.
1027 For the purposes of the
1032 form separate words (1.4).
1033 The appendix to this user's manual lists the
1035 in groups by their function.
1039 command is used to create a new directory.
1041 Substitutions with the
1043 mechanism, keyed by the character `!'
1044 or of variables using the metacharacter `$', are often subjected
1045 to modifications, indicated by placing the character `:' after the
1046 substitution and following this with the
1050 .I "command substitution"
1051 mechanism can also be used to perform modification in a similar way,
1052 but this notation is less clear (3.6).
1056 writes a file on your terminal allowing you to control how much text
1057 is displayed at a time.
1059 can move through the file screenful by screenful, line by line,
1060 search forward for a string, or start again at the beginning of the file.
1061 It is generally the easiest way of viewing a file (1.8).
1063 The shell has a variable
1065 which may be set in the file
1067 to prevent accidental destruction of files by the `>' output redirection
1068 metasyntax of the shell (2.2, 2.5).
1072 is set to suppress the
1073 .I "filename expansion"
1074 of arguments containing the metacharacters `~', `*', `?', `[' and `]' (3.6).
1078 command tells the shell to report on the termination of a specific
1080 at the exact time it occurs as opposed to waiting
1081 until just before the next prompt to report the termination.
1084 variable, if set, causes the shell to always report the termination
1087 jobs exactly when they occur (2.6).
1091 command is built into the shell and is used to control the action
1092 of a shell command script when an
1094 signal is received (3.9).
1096 Many commands in \s-2UNIX\s0 result in some lines of text which are
1101 is usually placed on what is known as the
1102 .I "standard output"
1103 which is normally connected to the user's terminal.
1104 The shell has a syntax using the metacharacter `>' for redirecting
1106 .I "standard output"
1107 of a command to a file (1.3).
1110 mechanism and the metacharacter `|' it is also possible for
1112 .I "standard output"
1113 of one command to become the
1115 of another command (1.5).
1116 Certain commands such as the line printer daemon
1118 do not place their results on the
1119 .I "standard output"
1121 useful places such as on the line printer (2.3).
1124 command places its output on another user's terminal rather than its
1125 .I "standard output"
1127 Commands also have a
1128 .I "diagnostic output"
1129 where they write their error messages.
1130 Normally these go to the terminal even if the
1131 .I "standard output"
1132 has been sent to a file or another command, but it is possible
1133 to direct error diagnostics along with
1134 .I "standard output"
1135 using a special metanotation (2.5).
1137 The shell has a variable
1139 which gives the names of the directories in which it searches for
1140 the commands which it is given.
1141 It always checks first to see if the command it is given is
1142 built into the shell.
1143 If it is, then it need not search for the command as it can do it internally.
1144 If the command is not builtin, then the shell searches for a file
1145 with the name given in each of the directories in the
1147 variable, left to right.
1148 Since the normal definition of the
1152 path (. /usr/ucb /bin /usr/bin)
1154 the shell normally looks in the current directory, and then in
1155 the standard system directories `/usr/ucb', `/bin' and `/usr/bin' for the named
1157 If the command cannot be found the shell will print an error diagnostic.
1158 Scripts of shell commands will be executed using another shell to interpret
1159 them if they have `execute' permission set.
1160 This is normally true because a command of the form
1164 was executed to turn this execute permission on (3.3).
1165 If you add new commands to a directory in the
1172 A list of names, separated by `/' characters, forms a
1176 between successive `/' characters, names a directory
1181 which begin with the character `/' are interpreted relative
1184 directory in the file system.
1187 are interpreted relative to the current directory
1190 The last component of a
1192 may name a directory, but
1193 usually names a file.
1195 A group of commands which are connected together, the
1196 .I "standard output"
1197 of each connected to the
1204 mechanism used to connect these commands is indicated by
1205 the shell metacharacter `|' (1.5, 2.3).
1209 command changes the shell's
1210 .I "working directory"
1211 to the directory you most recently left using the
1213 command. It returns to the directory without having to type its name,
1214 forgetting the name of the current
1215 .I "working directory"
1216 before doing so (2.7).
1218 The part of a computer system to which each terminal is
1219 connected is called a
1221 Usually the system has a fixed number of
1223 some of which are connected to telephone lines
1224 for dial-up access, and some of which are permanently
1225 wired directly to specific terminals.
1229 command is used to prepare listings of the contents of files
1230 with headers giving the name of the file and the date and
1231 time at which the file was last modified (2.3).
1236 to print the current setting of variables in the environment
1239 An instance of a running program is called a
1242 \s-2UNIX\s0 assigns each
1244 a unique number when it is
1245 started \- called the
1246 .I "process number" .
1247 .I "Process numbers"
1248 can be used to stop individual
1256 are part of a detached
1260 Usually synonymous with
1262 a binary file or shell command script
1263 which performs a useful function is often
1267 Many programs will print a
1269 on the terminal when they expect input.
1271 `ex (1)' will print a `:' when it expects input.
1274 for input with `% ' and occasionally with `? ' when
1275 reading commands from the terminal (1.1).
1276 The shell has a variable
1278 which may be set to a different value to change the shell's main
1280 This is mostly used when debugging the shell (2.8).
1284 command, which means `push directory', changes the shell's
1285 .I "working directory"
1286 and also remembers the current
1287 .I "working directory"
1288 before the change is made, allowing you to return to the same
1291 command later without retyping its name (2.7).
1295 command is used to show the processes you are currently running.
1296 Each process is shown with its unique process number,
1297 an indication of the terminal name it is attached to,
1298 an indication of the state of the process (whether it is running,
1299 stopped, awaiting some event (sleeping), and whether it is swapped out),
1300 and the amount of \s-2CPU\s0 time it has used so far.
1301 The command is identified by printing some of the words used
1302 when it was invoked (2.6).
1307 command, are not normally shown in the output.
1311 command prints the full
1314 .I "working directory" \&.
1317 builtin command is usually a better and faster choice.
1321 signal, generated by a control-\e,
1322 is used to terminate programs which are behaving unreasonably.
1323 It normally produces a core image file (1.8).
1325 The process by which metacharacters are prevented their special
1326 meaning, usually by using the character `\' in pairs, or by
1327 using the character `\e', is referred to as
1331 The routing of input or output from or to a file is known
1334 of input or output (1.3).
1338 command tells the shell to rebuild its internal table of which commands
1339 are found in which directories in your
1341 This is necessary when a new program is installed in one of these
1343 .IP "relative pathname"
1347 which does not begin with a `/' is called a
1348 .I "relative pathname"
1349 since it is interpreted
1352 .I "working directory" .
1357 refers to some file or directory in the
1358 .I "working directory" ,
1361 between `/' characters refer to directories below the
1362 .I "working directory" .
1367 .I "absolute pathnames"
1372 command iterates another command a specified number of times.
1375 that is at the top of the entire directory structure is called the
1377 directory since it is the `root' of the entire tree structure of
1378 directories. The name used in
1384 starting with `/' are said to be
1386 since they start at the
1390 is also used as the part of a
1392 that is left after removing
1397 for a further explanation (1.6).
1399 The \s-2RUBOUT\s0 or \s-2DELETE\s0
1400 key is often used to erase the previously typed character; some users
1401 prefer the \s-2BACKSPACE\s0 for this purpose. On older versions of \s-2UNIX\s0
1402 this key served as the \s-2INTR\s0 character.
1404 Files whose names begin with a `#' are referred to as
1405 .I "scratch files" ,
1406 since they are automatically removed by the system after a couple of
1407 days of non-use, or more frequently if disk space becomes tight (1.3).
1409 Sequences of shell commands placed in a file are called shell command
1411 It is often possible to perform simple tasks using these
1413 without writing a program in a language such as C, by
1414 using the shell to selectively run other programs (3.3, 3.10).
1418 command is used to assign new values to shell variables
1419 and to show the values of the current variables.
1420 Many shell variables have special meaning to the shell itself.
1423 command the behavior of the shell can be affected (2.1).
1425 Variables in the environment `environ (5)'
1426 can be changed by using the
1428 builtin command (2.8).
1431 command can be used to print the value of the variables in the environment.
1435 is a command language interpreter.
1436 It is possible to write and run your own
1440 are no different than any other programs as far as the
1441 system is concerned.
1442 This manual deals with the details of one particular
1453 in \s-2UNIX\s0 is a short message that is sent to a running program
1454 which causes something to happen to that process.
1456 are sent either by typing special
1458 characters on the keyboard or by using the
1462 commands (1.8, 2.6).
1466 program sorts a sequence of lines in ways that can be controlled
1473 command causes the shell to read commands from a specified file.
1474 It is most useful for reading files such as
1476 after changing them (2.8).
1477 .IP "special character"
1482 appendix to this manual.
1484 We refer often to the
1487 .I "standard output"
1495 A command normally returns a
1500 of zero indicates that the command succeeded.
1501 Commands may return non-zero
1503 to indicate that some abnormal event has occurred.
1508 returned by the last command.
1509 It is most useful in shell commmand scripts (3.6).
1519 A sequential group of characters taken together is called a
1522 can contain any printable characters (2.2).
1526 program changes certain parameters inside \s-2UNIX\s0 which determine
1527 how your terminal is handled. See `stty (1)' for a complete description (2.6).
1529 The shell implements a number of
1531 where sequences indicated by metacharacters are replaced by other sequences.
1532 Notable examples of this are history
1535 metacharacter `!' and variable
1546 after a \s-2STOP\s0 signal is sent to it, either by typing a
1548 at the terminal (for
1550 jobs) or by using the
1556 a job temporarily stops running until it is restarted by either the
1564 command of the shell allows the shell
1565 to select one of a number of sequences of commands based on an
1567 It is similar to the
1569 statement in the language C (3.7).
1571 When a command which is being executed finishes we say it undergoes
1575 Commands normally terminate when they read an
1576 .I end\f1-\fPof\f1-\fPfile
1578 .I "standard input" .
1579 It is also possible to terminate commands by sending them
1587 program terminates specified jobs (2.6).
1591 command is part of the shell's
1592 `if-then-else-endif' control construct used in command scripts (3.6).
1596 command can be used to measure the amount of \s-2CPU\s0
1597 and real time consumed by a specified command as well
1598 as the amount of disk i/o, memory utilized, and number
1599 of page faults and swaps taken by the command (2.1, 2.8).
1603 program is used to set standard erase and kill characters
1604 and to tell the system what kind of terminal you are using.
1605 It is often invoked in a
1611 is a historical abbreviation for `teletype' which is frequently used
1612 in \s-2UNIX\s0 to indicate the
1614 to which a given terminal is connected. The
1616 command will print the name of the
1620 to which your terminal is presently connected.
1624 command removes aliases (2.8).
1626 \s-2UNIX\s0 is an operating system on which
1629 \s-2UNIX\s0 provides facilities which allow
1631 to invoke other programs such as editors and text formatters which
1632 you may wish to use.
1636 command removes the definitions of shell variables (2.2, 2.8).
1637 .IP "variable expansion"
1648 hold one or more strings as value.
1649 The most common use of
1651 is in controlling the behavior
1662 are also used in writing shell programs (shell command scripts)
1667 shell variable can be set to cause commands to be echoed
1668 after they are history expanded.
1669 This is often useful in debugging shell scripts.
1672 variable is set by the shell's
1674 command line option (3.10).
1678 program calculates the number of characters, words, and lines in the
1679 files whose names are given as arguments (2.6).
1683 builtin control construct is used in shell command scripts (3.7).
1685 A sequence of characters which forms an argument to a command is called
1688 Many characters which are neither letters, digits, `\-', `.' nor `/'
1691 all by themselves even if they are not surrounded
1693 Any sequence of characters may be made into a
1696 with `\'' characters
1697 except for the characters `\'' and `!' which require special treatment
1699 This process of placing special characters in
1701 without their special meaning is called
1703 .IP "working directory"
1705 At any given time you are in one particular directory, called
1707 .I "working directory" .
1708 This directory's name is printed by the
1710 command and the files listed by
1712 are the ones in this directory.
1714 .I "working directories"
1720 command is an obsolete way of communicating with other users who are logged in to
1721 \s-2UNIX\s0 (you have to take turns typing). If you are both using display
1722 terminals, use \fItalk\fP(1), which is much more pleasant.