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 $
34 .\" $DragonFly: src/bin/csh/USD.doc/csh.g,v 1.2 2003/06/17 04:22:49 dillon Exp $
39 This glossary lists the most important terms introduced in the
41 shell and gives references to sections of the shell
42 document for further information about them.
43 References of the form
45 indicate that the command
47 is in the \s-2UNIX\s0 User Reference manual in section 1.
48 You can look at an online copy of its manual page by doing
52 References of the form (2.5)
53 indicate that more information can be found in section 2.5 of this
56 Your current directory has the name `.' as well as the name printed
61 The current directory `.' is usually the first
63 of the search path contained in the variable
65 thus commands which are in `.' are found first (2.2).
66 The character `.' is also used in separating
70 The character `.' at the beginning of a
74 is treated specially and not matched by the
75 .I "filename expansion"
76 metacharacters `?', `*', and `[' `]' pairs (1.6).
78 Each directory has a file `..' in it which is a reference to its
80 After changing into the directory with
86 you can return to the parent directory by doing
90 The current directory is printed by
94 Compilers which create executable images create them, by default, in the
97 for historical reasons (2.3).
98 .IP "absolute pathname"
102 which begins with a `/' is
104 since it specifies the
106 of directories from the beginning
107 of the entire directory system \- called the
116 .I "relative pathname" )
121 specifies a shorter or different name for a \s-2UNIX\s0
122 command, or a transformation on a command to be performed in
124 The shell has a command
128 and can print their current values.
135 Commands in \s-2UNIX\s0 receive a list of
146 words `a', `b' and `c'.
153 of the command (1.1).
155 The list of arguments to a command written in the shell language
156 (a shell script or shell procedure) is stored in a variable called
159 This name is taken from the conventional name in the
160 C programming language (3.4).
162 Commands started without waiting for them to complete are called
166 A filename is sometimes thought of as consisting of a
168 part, before any `.' character, and an
175 (1.6) and basename (1).
181 job to continue execution in the
185 A directory containing binaries of programs and shell scripts to be
186 executed is typically called a
191 directories are `/bin' containing the most
192 heavily used commands and `/usr/bin' which contains most other user
194 Programs developed at UC Berkeley live in `/usr/ucb', while locally
195 written programs live in `/usr/local'. Games are kept in the directory
197 You can place binaries in any directory.
198 If you wish to execute them often, the name of the directories
205 is a builtin command used to exit from loops within the control
206 structure of the shell (3.7).
210 builtin command is used to exit from a
212 control structure, like a
214 exits from loops (3.7).
216 A command executed directly by the shell is called a
219 Most commands in \s-2UNIX\s0 are not built into the shell,
220 but rather exist as files in
223 These commands are accessible because the directories in which
224 they reside are named in the
230 command is used as a label in a
232 statement in the shell's control structure, similar to that of the
234 Details are given in the shell documentation `csh (1)' (3.7).
238 program catenates a list of specified files on the
239 .I "standard output" .
240 It is usually used to look at the contents of a single file on the terminal,
241 to `cat a file' (1.8, 2.3).
245 command is used to change the
246 .I "working directory" .
250 .I "working directory"
253 directory (2.4, 2.7).
257 command is a synonym for
260 is usually used because it is easier to type.
264 command is used to change the shell which you use on \s-2UNIX\s0.
265 By default, you use a different version of the shell
266 which resides in `/bin/sh'.
267 You can change your shell to `/bin/csh' by doing
269 chsh your-login-name /bin/csh
275 It is only necessary to do this once.
276 The next time you log in to \s-2UNIX\s0 after doing this command,
279 rather than the shell in `/bin/sh' (1.9).
282 is a program which compares files.
283 It is usually used on binary files, or to see if two files are identical (3.6).
284 For comparing text files the program
286 described in `diff (1)' is used.
288 A function performed by the system, either by the shell
291 or by a program residing in a file in
292 a directory within the \s-2UNIX\s0 system, is called a
297 When a command is issued, it consists of a
299 which is the first word of the command,
300 followed by arguments.
301 The convention on \s-2UNIX\s0 is that the first word of a
302 command names the function to be performed (1.1).
303 .IP "command substitution"
305 The replacement of a command enclosed in `\`' characters
306 by the text output by that command
308 .I "command substitution"
313 between `/' characters is called a
318 which has multiple strings as value is said to have
325 A builtin command which causes execution of the enclosing
329 loop to cycle prematurely.
332 command in the programming language C (3.6).
334 Certain special characters, called
336 characters, are produced by holding down the \s-2CONTROL\s0 key
337 on your terminal and simultaneously pressing another character, much like
338 the \s-2SHIFT\s0 key is used to produce upper case characters. Thus
340 is produced by holding down the \s-2CONTROL\s0 key while pressing the
341 `c' key. Usually \s-2UNIX\s0 prints a caret (^) followed by the
342 corresponding letter when you type a
344 character (e.g. `^C' for
348 When a program terminates abnormally, the system places an image
349 of its current state in a file named `core'.
352 can be examined with the system debugger `adb (1)'
353 or `sdb (1)' in order to determine what went wrong with the program (1.8).
354 If the shell produces a message of the form
356 Illegal instruction (core dumped)
358 (where `Illegal instruction' is only one of several possible
359 messages), you should report this to the author of the program
360 or a system administrator,
361 saving the `core' file.
365 (copy) program is used to copy the contents of one file into another
367 It is one of the most commonly used \s-2UNIX\s0 commands (1.6).
369 The name of the shell
370 program that this document describes.
376 directory is read by each shell as it begins execution.
377 It is usually used to change the setting of the variable
381 parameters which are to take effect globally (2.1).
385 variable in the shell holds the
386 .I "absolute pathname"
388 .I "working directory" \&.
389 It is changed by the shell whenever your current
390 .I "working directory"
391 changes and should not be changed otherwise (2.2).
395 command prints the current date and time (1.3).
398 is the process of correcting mistakes in programs and shell scripts.
399 The shell has several options and variables which may be used
408 statements, as it is in the C language
409 to label the code to be executed if none of the
411 labels matches the value switched on (3.7).
417 key on the terminal normally causes an interrupt to be sent to the current job.
418 Many users change the interrupt character to be ^C.
420 A command that continues running in the
422 after you logout is said to be
425 An error message produced by a program is often referred to as a
427 Most error messages are not written to the
428 .I "standard output" ,
429 since that is often directed away from the terminal (1.3, 1.5).
430 Error messsages are instead written to the
431 .I "diagnostic output"
432 which may be directed away from the terminal, but usually is not.
435 will usually appear on the terminal (2.5).
437 A structure which contains files.
438 At any time you are in one particular
440 whose names can be printed by the command
444 command will change you to another
451 in which you are when you first login is your
453 directory (1.1, 2.7).
454 .IP "directory\ stack"
455 The shell saves the names of previous
456 .I "working directories"
459 when you change your current
460 .I "working directory"
465 can be printed by using the
467 command, which includes your current
468 .I "working directory"
469 as the first directory name on the left (2.7).
473 command prints the shell's
479 command is a program (described in `du (1)') which
480 prints the number of disk blocks is all directories below
481 and including your current
482 .I "working directory"
487 command prints its arguments (1.6, 3.6).
491 command is part of the `if-then-else-endif' control
492 command construct (3.6).
496 statement is ended with the word
498 all lines following the
500 up to a line starting with the word
504 are executed if the condition between parentheses after the
509 .I "end\f1-\fPof\f1-\fPfile"
510 is generated by the terminal by a control-d,
511 and whenever a command reads to the end of a file which
512 it has been given as input.
513 Commands receiving input from a
516 .I "end\f1-\fPof\f1-\fPfile"
517 when the command sending them input completes.
518 Most commands terminate when they receive an
519 .I "end\f1-\fPof\f1-\fPfile" .
520 The shell has an option to ignore
521 .I "end\f1-\fPof\f1-\fPfile"
523 input which may help you keep from logging out accidentally
524 by typing too many control-d's (1.1, 1.8, 3.8).
526 A character `\e' used to prevent the special meaning of a metacharacter
529 the character from its special meaning.
534 will echo the character `*' while just
538 will echo the names of the file in the current directory.
542 There is also a non-printing character called
548 on terminal keyboards.
549 Some older \s-2UNIX\s0 systems use this character to indicate that
552 Most systems use control-s to stop the output and control-q to start it.
554 This file contains information about the accounts currently on the
556 It consists of a line for each account with fields separated by
557 `:' characters (1.8).
558 You can look at this file by saying
566 are often used to search for information in this file.
567 See `finger (1)', `passwd(5)', and `grep (1)' for more details.
571 command is used to force termination of a shell script,
572 and is built into the shell (3.9).
574 A command which discovers a problem may reflect this back to the command
575 (such as a shell) which invoked (executed) it.
576 It does this by returning a non-zero number as its
578 a status of zero being considered
579 `normal termination'.
582 command can be used to force a shell command script to give a non-zero
586 The replacement of strings in the shell input which contain metacharacters
587 by other strings is referred to as the process of
589 Thus the replacement of the word `*' by a sorted list of files
590 in the current directory is a `filename expansion'.
591 Similarly the replacement of the characters `!!' by the text of
592 the last command is a `history expansion'.
594 are also referred to as
599 are used in the shell
600 to control the conditional structures used in the writing of shell
601 scripts and in calculating values for these scripts.
602 The operators available in shell
604 are those of the language
607 Filenames often consist of a
611 separated by the character `.'.
612 By convention, groups of related files often share the same
615 Thus if `prog.c' were a C program, then the object file for this
616 program would be stored in `prog.o'.
617 Similarly a paper written with the
619 nroff macro package might be stored in
621 while a formatted version of this paper might be kept in
622 `paper.out' and a list of spelling errors in
637 Each file in \s-2UNIX\s0 has a name consisting of up to 14 characters
638 and not including the character `/' which is used in
642 do not begin with the character `.', and contain
643 only letters and digits with perhaps a `.' separating the
650 .IP "filename expansion"
652 .I "Filename expansion"
653 uses the metacharacters `*', `?' and `[' and `]'
654 to provide a convenient mechanism for naming files.
656 .I "filename expansion"
657 it is easy to name all the files in
658 the current directory, or all files which have a common
661 .I "filename expansion"
662 mechanisms use the metacharacter `~' and allow
663 files in other users' directories to be named easily (1.6, 4.2).
665 Many \s-2UNIX\s0 commands accept arguments which are not the names
666 of files or other users but are used to modify the action of the commands.
667 These are referred to as
669 options, and by convention consist of one or more letters preceded by
670 the character `\-' (1.2).
673 (list files) command has an option
674 `\-s' to list the sizes of files.
682 command is used in shell scripts and at the terminal to specify
683 repetition of a sequence of commands while the value of a certain
684 shell variable ranges through a specified list (3.6, 4.1).
686 When commands are executing in the normal way such that the
687 shell is waiting for them to finish before prompting for another
688 command they are said to be
691 .I "running in the foreground" \&.
692 This is as opposed to
695 jobs can be stopped by signals
696 from the terminal caused by typing different
697 control characters at the keyboard (1.8, 2.6).
699 The shell has a command
701 used in shell scripts to transfer control to a given label (3.7).
705 command searches through a list of argument files for a specified string.
708 grep bill /etc/passwd
710 will print each line in the file
712 which contains the string `bill'.
716 .I "regular expressions"
717 in the sense of the editors
718 `ed (1)' and `ex (1)'.
722 .I "regular expression"
727 command prints the first few lines of one or more files.
728 If you have a bunch of files containing text which you are wondering
729 about it is sometimes useful to run
731 with these files as arguments.
732 This will usually show enough of what is in these files to let you decide
733 which you are interested in (1.5).
736 is also used to describe the part of a
738 before and including the last `/' character. The
742 is the part after the last `/'. The `:h' and `:t' modifiers allow the
748 stored in a shell variable to be used (3.6).
752 mechanism of the shell allows previous commands to be repeated,
753 possibly after modification to correct typing mistakes or to change
754 the meaning of the command.
757 where these commands are kept, and a
759 variable which controls how large this list is (2.3).
760 .IP "home\ directory"
763 .I "home directory" ,
764 which is given in your entry
765 in the password file,
767 This is the directory which you are placed in when you first login.
772 command with no arguments takes you back to this directory, whose
773 name is recorded in the shell variable
775 You can also access the
776 .I "home directories"
777 of other users in forming
779 .I "filename expansion"
780 notation and the character `~' (1.6).
782 A conditional command within the shell, the
784 command is used in shell command scripts to make decisions
785 about what course of action to take next (3.6).
787 Normally, your shell will exit, printing
789 if you type a control-d at a prompt of `% '.
790 This is the way you usually log off the system.
795 variable if you wish in your
797 file and then use the command
800 This is useful if you sometimes accidentally type too many control-d
801 characters, logging yourself off
804 Many commands on \s-2UNIX\s0 take information from the terminal or from
805 files which they then act on.
806 This information is called
808 Commands normally read for
812 which is, by default, the terminal.
815 can be redirected from a file using a shell metanotation
816 with the character `<'.
817 Many commands will also read from a file specified as argument.
820 will read from the output of the previous
823 The leftmost command in a
825 reads from the terminal if
826 you neither redirect its
828 nor give it a filename to use as
829 .I "standard input" .
830 Special mechanisms exist for supplying input to commands in shell
835 is a signal to a program that is generated by typing ^C. (On older versions
836 of UNIX the \s-2RUBOUT\s0 or \s-2DELETE\s0 key were used for this purpose.)
837 It causes most programs to stop execution.
838 Certain programs, such as the shell and the editors,
841 in special ways, usually by stopping what they
842 are doing and prompting for another command.
843 While the shell is executing another command and waiting for it
844 to finish, the shell does not listen to
846 The shell often wakes up when you hit
848 because many commands
849 die when they receive an
854 typed on the same input line separated by `|' or `;' characters
855 are run together and are called a
857 Simple commands run by themselves without any `|' or `;' characters
868 The builtin functions that control the execution of
872 .I "bg, fg, stop, kill"
876 is started it is assigned a small number called a
878 which is printed next to the job in the output of the
880 command. This number, preceded by a `%' character, can be used as an argument
884 a specific job (2.6).
888 command prints a table showing
889 jobs that are either running in the
895 A command which sends a
897 to a job causing it to terminate (2.6).
903 directory is read by the shell each time you login to \s-2UNIX\s0
904 and the commands there are executed.
905 There are a number of commands which are usefully placed here,
908 commands to the shell itself (2.1).
910 The shell that is started on your terminal when you login is called
913 It is different from other shells which you may run (e.g. on
917 file before reading commands from the terminal and it reads the
919 file after you logout
924 command causes a login shell to exit.
925 Normally, a login shell will exit when you hit control-d
927 .I end\f1-\fPof\f1-\fPfile,
932 file then this will not work and you must use
934 to log off the \s-2UNIX\s0 system (2.8).
936 When you log off of \s-2UNIX\s0 the shell will execute commands from
941 directory after it prints `logout'.
945 is the line printer daemon.
946 The standard input of
948 spooled and printed on the \s-2UNIX\s0 line printer.
951 a list of filenames as arguments to be printed.
952 It is most common to use
954 as the last component of a
960 (list files) command is one of the most commonly used \s-2UNIX\s0
962 With no argument filenames it prints the names of the files in the
964 It has a number of useful
966 arguments, and can also be given the names of directories
967 as arguments, in which case it lists the names of the files in these
972 program is used to send and receive messages from other \s-2UNIX\s0
973 users (1.1, 2.1), whether they are logged on or not.
977 command is used to maintain one or more related files and to
978 organize functions to be performed on these files.
981 is easier to use, and more helpful than
982 shell command scripts (3.2).
984 The file containing commands for
994 often referred to is the
995 `\s-2UNIX\s0 manual'.
996 It contains 8 numbered sections with a description of each \s-2UNIX\s0
997 program (section 1), system call (section 2), subroutine (section 3),
998 device (section 4), special data structure (section 5), game (section 6),
999 miscellaneous item (section 7) and system administration program (section 8).
1000 There are also supplementary documents (tutorials and reference guides)
1001 for individual programs which require explanation in more detail.
1002 An online version of the
1004 is accessible through the
1007 Its documentation can be obtained online via
1011 If you can't decide what manual page to look in, try the
1014 The supplementary documents are in subdirectories of /usr/doc.
1017 Many characters which are neither letters nor digits have special meaning
1018 either to the shell or to \s-2UNIX\s0.
1019 These characters are called
1021 If it is necessary to place these characters in arguments to commands
1022 without them having their special meaning then they must be
1026 is the character `>' which is used
1027 to indicate placement of output into a file.
1028 For the purposes of the
1033 form separate words (1.4).
1034 The appendix to this user's manual lists the
1036 in groups by their function.
1040 command is used to create a new directory.
1042 Substitutions with the
1044 mechanism, keyed by the character `!'
1045 or of variables using the metacharacter `$', are often subjected
1046 to modifications, indicated by placing the character `:' after the
1047 substitution and following this with the
1051 .I "command substitution"
1052 mechanism can also be used to perform modification in a similar way,
1053 but this notation is less clear (3.6).
1057 writes a file on your terminal allowing you to control how much text
1058 is displayed at a time.
1060 can move through the file screenful by screenful, line by line,
1061 search forward for a string, or start again at the beginning of the file.
1062 It is generally the easiest way of viewing a file (1.8).
1064 The shell has a variable
1066 which may be set in the file
1068 to prevent accidental destruction of files by the `>' output redirection
1069 metasyntax of the shell (2.2, 2.5).
1073 is set to suppress the
1074 .I "filename expansion"
1075 of arguments containing the metacharacters `~', `*', `?', `[' and `]' (3.6).
1079 command tells the shell to report on the termination of a specific
1081 at the exact time it occurs as opposed to waiting
1082 until just before the next prompt to report the termination.
1085 variable, if set, causes the shell to always report the termination
1088 jobs exactly when they occur (2.6).
1092 command is built into the shell and is used to control the action
1093 of a shell command script when an
1095 signal is received (3.9).
1097 Many commands in \s-2UNIX\s0 result in some lines of text which are
1102 is usually placed on what is known as the
1103 .I "standard output"
1104 which is normally connected to the user's terminal.
1105 The shell has a syntax using the metacharacter `>' for redirecting
1107 .I "standard output"
1108 of a command to a file (1.3).
1111 mechanism and the metacharacter `|' it is also possible for
1113 .I "standard output"
1114 of one command to become the
1116 of another command (1.5).
1117 Certain commands such as the line printer daemon
1119 do not place their results on the
1120 .I "standard output"
1122 useful places such as on the line printer (2.3).
1125 command places its output on another user's terminal rather than its
1126 .I "standard output"
1128 Commands also have a
1129 .I "diagnostic output"
1130 where they write their error messages.
1131 Normally these go to the terminal even if the
1132 .I "standard output"
1133 has been sent to a file or another command, but it is possible
1134 to direct error diagnostics along with
1135 .I "standard output"
1136 using a special metanotation (2.5).
1138 The shell has a variable
1140 which gives the names of the directories in which it searches for
1141 the commands which it is given.
1142 It always checks first to see if the command it is given is
1143 built into the shell.
1144 If it is, then it need not search for the command as it can do it internally.
1145 If the command is not builtin, then the shell searches for a file
1146 with the name given in each of the directories in the
1148 variable, left to right.
1149 Since the normal definition of the
1153 path (. /usr/ucb /bin /usr/bin)
1155 the shell normally looks in the current directory, and then in
1156 the standard system directories `/usr/ucb', `/bin' and `/usr/bin' for the named
1158 If the command cannot be found the shell will print an error diagnostic.
1159 Scripts of shell commands will be executed using another shell to interpret
1160 them if they have `execute' permission set.
1161 This is normally true because a command of the form
1165 was executed to turn this execute permission on (3.3).
1166 If you add new commands to a directory in the
1173 A list of names, separated by `/' characters, forms a
1177 between successive `/' characters, names a directory
1182 which begin with the character `/' are interpreted relative
1185 directory in the file system.
1188 are interpreted relative to the current directory
1191 The last component of a
1193 may name a directory, but
1194 usually names a file.
1196 A group of commands which are connected together, the
1197 .I "standard output"
1198 of each connected to the
1205 mechanism used to connect these commands is indicated by
1206 the shell metacharacter `|' (1.5, 2.3).
1210 command changes the shell's
1211 .I "working directory"
1212 to the directory you most recently left using the
1214 command. It returns to the directory without having to type its name,
1215 forgetting the name of the current
1216 .I "working directory"
1217 before doing so (2.7).
1219 The part of a computer system to which each terminal is
1220 connected is called a
1222 Usually the system has a fixed number of
1224 some of which are connected to telephone lines
1225 for dial-up access, and some of which are permanently
1226 wired directly to specific terminals.
1230 command is used to prepare listings of the contents of files
1231 with headers giving the name of the file and the date and
1232 time at which the file was last modified (2.3).
1237 to print the current setting of variables in the environment
1240 An instance of a running program is called a
1243 \s-2UNIX\s0 assigns each
1245 a unique number when it is
1246 started \- called the
1247 .I "process number" .
1248 .I "Process numbers"
1249 can be used to stop individual
1257 are part of a detached
1261 Usually synonymous with
1263 a binary file or shell command script
1264 which performs a useful function is often
1268 Many programs will print a
1270 on the terminal when they expect input.
1272 `ex (1)' will print a `:' when it expects input.
1275 for input with `% ' and occasionally with `? ' when
1276 reading commands from the terminal (1.1).
1277 The shell has a variable
1279 which may be set to a different value to change the shell's main
1281 This is mostly used when debugging the shell (2.8).
1285 command, which means `push directory', changes the shell's
1286 .I "working directory"
1287 and also remembers the current
1288 .I "working directory"
1289 before the change is made, allowing you to return to the same
1292 command later without retyping its name (2.7).
1296 command is used to show the processes you are currently running.
1297 Each process is shown with its unique process number,
1298 an indication of the terminal name it is attached to,
1299 an indication of the state of the process (whether it is running,
1300 stopped, awaiting some event (sleeping), and whether it is swapped out),
1301 and the amount of \s-2CPU\s0 time it has used so far.
1302 The command is identified by printing some of the words used
1303 when it was invoked (2.6).
1308 command, are not normally shown in the output.
1312 command prints the full
1315 .I "working directory" \&.
1318 builtin command is usually a better and faster choice.
1322 signal, generated by a control-\e,
1323 is used to terminate programs which are behaving unreasonably.
1324 It normally produces a core image file (1.8).
1326 The process by which metacharacters are prevented their special
1327 meaning, usually by using the character `\' in pairs, or by
1328 using the character `\e', is referred to as
1332 The routing of input or output from or to a file is known
1335 of input or output (1.3).
1339 command tells the shell to rebuild its internal table of which commands
1340 are found in which directories in your
1342 This is necessary when a new program is installed in one of these
1344 .IP "relative pathname"
1348 which does not begin with a `/' is called a
1349 .I "relative pathname"
1350 since it is interpreted
1353 .I "working directory" .
1358 refers to some file or directory in the
1359 .I "working directory" ,
1362 between `/' characters refer to directories below the
1363 .I "working directory" .
1368 .I "absolute pathnames"
1373 command iterates another command a specified number of times.
1376 that is at the top of the entire directory structure is called the
1378 directory since it is the `root' of the entire tree structure of
1379 directories. The name used in
1385 starting with `/' are said to be
1387 since they start at the
1391 is also used as the part of a
1393 that is left after removing
1398 for a further explanation (1.6).
1400 The \s-2RUBOUT\s0 or \s-2DELETE\s0
1401 key is often used to erase the previously typed character; some users
1402 prefer the \s-2BACKSPACE\s0 for this purpose. On older versions of \s-2UNIX\s0
1403 this key served as the \s-2INTR\s0 character.
1405 Files whose names begin with a `#' are referred to as
1406 .I "scratch files" ,
1407 since they are automatically removed by the system after a couple of
1408 days of non-use, or more frequently if disk space becomes tight (1.3).
1410 Sequences of shell commands placed in a file are called shell command
1412 It is often possible to perform simple tasks using these
1414 without writing a program in a language such as C, by
1415 using the shell to selectively run other programs (3.3, 3.10).
1419 command is used to assign new values to shell variables
1420 and to show the values of the current variables.
1421 Many shell variables have special meaning to the shell itself.
1424 command the behavior of the shell can be affected (2.1).
1426 Variables in the environment `environ (5)'
1427 can be changed by using the
1429 builtin command (2.8).
1432 command can be used to print the value of the variables in the environment.
1436 is a command language interpreter.
1437 It is possible to write and run your own
1441 are no different than any other programs as far as the
1442 system is concerned.
1443 This manual deals with the details of one particular
1454 in \s-2UNIX\s0 is a short message that is sent to a running program
1455 which causes something to happen to that process.
1457 are sent either by typing special
1459 characters on the keyboard or by using the
1463 commands (1.8, 2.6).
1467 program sorts a sequence of lines in ways that can be controlled
1474 command causes the shell to read commands from a specified file.
1475 It is most useful for reading files such as
1477 after changing them (2.8).
1478 .IP "special character"
1483 appendix to this manual.
1485 We refer often to the
1488 .I "standard output"
1496 A command normally returns a
1501 of zero indicates that the command succeeded.
1502 Commands may return non-zero
1504 to indicate that some abnormal event has occurred.
1509 returned by the last command.
1510 It is most useful in shell commmand scripts (3.6).
1520 A sequential group of characters taken together is called a
1523 can contain any printable characters (2.2).
1527 program changes certain parameters inside \s-2UNIX\s0 which determine
1528 how your terminal is handled. See `stty (1)' for a complete description (2.6).
1530 The shell implements a number of
1532 where sequences indicated by metacharacters are replaced by other sequences.
1533 Notable examples of this are history
1536 metacharacter `!' and variable
1547 after a \s-2STOP\s0 signal is sent to it, either by typing a
1549 at the terminal (for
1551 jobs) or by using the
1557 a job temporarily stops running until it is restarted by either the
1565 command of the shell allows the shell
1566 to select one of a number of sequences of commands based on an
1568 It is similar to the
1570 statement in the language C (3.7).
1572 When a command which is being executed finishes we say it undergoes
1576 Commands normally terminate when they read an
1577 .I end\f1-\fPof\f1-\fPfile
1579 .I "standard input" .
1580 It is also possible to terminate commands by sending them
1588 program terminates specified jobs (2.6).
1592 command is part of the shell's
1593 `if-then-else-endif' control construct used in command scripts (3.6).
1597 command can be used to measure the amount of \s-2CPU\s0
1598 and real time consumed by a specified command as well
1599 as the amount of disk i/o, memory utilized, and number
1600 of page faults and swaps taken by the command (2.1, 2.8).
1604 program is used to set standard erase and kill characters
1605 and to tell the system what kind of terminal you are using.
1606 It is often invoked in a
1612 is a historical abbreviation for `teletype' which is frequently used
1613 in \s-2UNIX\s0 to indicate the
1615 to which a given terminal is connected. The
1617 command will print the name of the
1621 to which your terminal is presently connected.
1625 command removes aliases (2.8).
1627 \s-2UNIX\s0 is an operating system on which
1630 \s-2UNIX\s0 provides facilities which allow
1632 to invoke other programs such as editors and text formatters which
1633 you may wish to use.
1637 command removes the definitions of shell variables (2.2, 2.8).
1638 .IP "variable expansion"
1649 hold one or more strings as value.
1650 The most common use of
1652 is in controlling the behavior
1663 are also used in writing shell programs (shell command scripts)
1668 shell variable can be set to cause commands to be echoed
1669 after they are history expanded.
1670 This is often useful in debugging shell scripts.
1673 variable is set by the shell's
1675 command line option (3.10).
1679 program calculates the number of characters, words, and lines in the
1680 files whose names are given as arguments (2.6).
1684 builtin control construct is used in shell command scripts (3.7).
1686 A sequence of characters which forms an argument to a command is called
1689 Many characters which are neither letters, digits, `\-', `.' nor `/'
1692 all by themselves even if they are not surrounded
1694 Any sequence of characters may be made into a
1697 with `\'' characters
1698 except for the characters `\'' and `!' which require special treatment
1700 This process of placing special characters in
1702 without their special meaning is called
1704 .IP "working directory"
1706 At any given time you are in one particular directory, called
1708 .I "working directory" .
1709 This directory's name is printed by the
1711 command and the files listed by
1713 are the ones in this directory.
1715 .I "working directories"
1721 command is an obsolete way of communicating with other users who are logged in to
1722 \s-2UNIX\s0 (you have to take turns typing). If you are both using display
1723 terminals, use \fItalk\fP(1), which is much more pleasant.