1 .\" $NetBSD: csh.g,v 1.5 2003/08/07 09:05:08 agc Exp $
3 .\" Copyright (c) 1980, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)csh.g 8.1 (Berkeley) 6/8/93
35 This glossary lists the most important terms introduced in the
37 shell and gives references to sections of the shell
38 document for further information about them.
39 References of the form
41 indicate that the command
43 is in the \s-2UNIX\s0 User Reference manual in section 1.
44 You can look at an online copy of its manual page by doing
48 References of the form (2.5)
49 indicate that more information can be found in section 2.5 of this
52 Your current directory has the name `.' as well as the name printed
57 The current directory `.' is usually the first
59 of the search path contained in the variable
61 thus commands which are in `.' are found first (2.2).
62 The character `.' is also used in separating
66 The character `.' at the beginning of a
70 is treated specially and not matched by the
71 .I "filename expansion"
72 metacharacters `?', `*', and `[' `]' pairs (1.6).
74 Each directory has a file `..' in it which is a reference to its
76 After changing into the directory with
82 you can return to the parent directory by doing
86 The current directory is printed by
90 Compilers which create executable images create them, by default, in the
93 for historical reasons (2.3).
94 .IP "absolute pathname"
98 which begins with a `/' is
100 since it specifies the
102 of directories from the beginning
103 of the entire directory system \- called the
112 .I "relative pathname" )
117 specifies a shorter or different name for a \s-2UNIX\s0
118 command, or a transformation on a command to be performed in
120 The shell has a command
124 and can print their current values.
131 Commands in \s-2UNIX\s0 receive a list of
142 words `a', `b' and `c'.
149 of the command (1.1).
151 The list of arguments to a command written in the shell language
152 (a shell script or shell procedure) is stored in a variable called
155 This name is taken from the conventional name in the
156 C programming language (3.4).
158 Commands started without waiting for them to complete are called
162 A filename is sometimes thought of as consisting of a
164 part, before any `.' character, and an
171 (1.6) and basename (1).
177 job to continue execution in the
181 A directory containing binaries of programs and shell scripts to be
182 executed is typically called a
187 directories are `/bin' containing the most
188 heavily used commands and `/usr/bin' which contains most other user
190 Programs developed at UC Berkeley live in `/usr/ucb', while locally
191 written programs live in `/usr/local'. Games are kept in the directory
193 You can place binaries in any directory.
194 If you wish to execute them often, the name of the directories
201 is a builtin command used to exit from loops within the control
202 structure of the shell (3.7).
206 builtin command is used to exit from a
208 control structure, like a
210 exits from loops (3.7).
212 A command executed directly by the shell is called a
215 Most commands in \s-2UNIX\s0 are not built into the shell,
216 but rather exist as files in
219 These commands are accessible because the directories in which
220 they reside are named in the
226 command is used as a label in a
228 statement in the shell's control structure, similar to that of the
230 Details are given in the shell documentation `csh (1)' (3.7).
234 program catenates a list of specified files on the
235 .I "standard output" .
236 It is usually used to look at the contents of a single file on the terminal,
237 to `cat a file' (1.8, 2.3).
241 command is used to change the
242 .I "working directory" .
246 .I "working directory"
249 directory (2.4, 2.7).
253 command is a synonym for
256 is usually used because it is easier to type.
260 command is used to change the shell which you use on \s-2UNIX\s0.
261 By default, you use an different version of the shell
262 which resides in `/bin/sh'.
263 You can change your shell to `/bin/csh' by doing
265 chsh your-login-name /bin/csh
271 It is only necessary to do this once.
272 The next time you log in to \s-2UNIX\s0 after doing this command,
275 rather than the shell in `/bin/sh' (1.9).
278 is a program which compares files.
279 It is usually used on binary files, or to see if two files are identical (3.6).
280 For comparing text files the program
282 described in `diff (1)' is used.
284 A function performed by the system, either by the shell
287 or by a program residing in a file in
288 a directory within the \s-2UNIX\s0 system, is called a
293 When a command is issued, it consists of a
295 which is the first word of the command,
296 followed by arguments.
297 The convention on \s-2UNIX\s0 is that the first word of a
298 command names the function to be performed (1.1).
299 .IP "command substitution"
301 The replacement of a command enclosed in `\`' characters
302 by the text output by that command
304 .I "command substitution"
309 between `/' characters is called a
314 which has multiple strings as value is said to have
321 A builtin command which causes execution of the enclosing
325 loop to cycle prematurely.
328 command in the programming language C (3.6).
330 Certain special characters, called
332 characters, are produced by holding down the \s-2CONTROL\s0 key
333 on your terminal and simultaneously pressing another character, much like
334 the \s-2SHIFT\s0 key is used to produce upper case characters. Thus
336 is produced by holding down the \s-2CONTROL\s0 key while pressing the
337 `c' key. Usually \s-2UNIX\s0 prints an caret (^) followed by the
338 corresponding letter when you type a
340 character (e.g. `^C' for
344 When a program terminates abnormally, the system places an image
345 of its current state in a file named `core'.
348 can be examined with the system debugger `adb (1)'
349 or `sdb (1)' in order to determine what went wrong with the program (1.8).
350 If the shell produces a message of the form
352 Illegal instruction (core dumped)
354 (where `Illegal instruction' is only one of several possible
355 messages), you should report this to the author of the program
356 or a system administrator,
357 saving the `core' file.
361 (copy) program is used to copy the contents of one file into another
363 It is one of the most commonly used \s-2UNIX\s0 commands (1.6).
365 The name of the shell
366 program that this document describes.
372 directory is read by each shell as it begins execution.
373 It is usually used to change the setting of the variable
377 parameters which are to take effect globally (2.1).
381 variable in the shell holds the
382 .I "absolute pathname"
384 .I "working directory" \&.
385 It is changed by the shell whenever your current
386 .I "working directory"
387 changes and should not be changed otherwise (2.2).
391 command prints the current date and time (1.3).
394 is the process of correcting mistakes in programs and shell scripts.
395 The shell has several options and variables which may be used
404 statements, as it is in the C language
405 to label the code to be executed if none of the
407 labels matches the value switched on (3.7).
413 key on the terminal normally causes an interrupt to be sent to the current job.
414 Many users change the interrupt character to be ^C.
416 A command that continues running in the
418 after you logout is said to be
421 An error message produced by a program is often referred to as a
423 Most error messages are not written to the
424 .I "standard output" ,
425 since that is often directed away from the terminal (1.3, 1.5).
426 Error messsages are instead written to the
427 .I "diagnostic output"
428 which may be directed away from the terminal, but usually is not.
431 will usually appear on the terminal (2.5).
433 A structure which contains files.
434 At any time you are in one particular
436 whose names can be printed by the command
440 command will change you to another
447 in which you are when you first login is your
449 directory (1.1, 2.7).
450 .IP "directory\ stack"
451 The shell saves the names of previous
452 .I "working directories"
455 when you change your current
456 .I "working directory"
461 can be printed by using the
463 command, which includes your current
464 .I "working directory"
465 as the first directory name on the left (2.7).
469 command prints the shell's
475 command is a program (described in `du (1)') which
476 prints the number of disk blocks is all directories below
477 and including your current
478 .I "working directory"
483 command prints its arguments (1.6, 3.6).
487 command is part of the `if-then-else-endif' control
488 command construct (3.6).
492 statement is ended with the word
494 all lines following the
496 up to a line starting with the word
500 are executed if the condition between parentheses after the
505 .I "end\f1-\fPof\f1-\fPfile"
506 is generated by the terminal by a control-d,
507 and whenever a command reads to the end of a file which
508 it has been given as input.
509 Commands receiving input from a
512 .I "end\f1-\fPof\f1-\fPfile"
513 when the command sending them input completes.
514 Most commands terminate when they receive an
515 .I "end\f1-\fPof\f1-\fPfile" .
516 The shell has an option to ignore
517 .I "end\f1-\fPof\f1-\fPfile"
519 input which may help you keep from logging out accidentally
520 by typing too many control-d's (1.1, 1.8, 3.8).
522 A character `\e' used to prevent the special meaning of a metacharacter
525 the character from its special meaning.
530 will echo the character `*' while just
534 will echo the names of the file in the current directory.
538 There is also a non-printing character called
544 on terminal keyboards.
545 Some older \s-2UNIX\s0 systems use this character to indicate that
548 Most systems use control-s to stop the output and control-q to start it.
550 This file contains information about the accounts currently on the
552 It consists of a line for each account with fields separated by
553 `:' characters (1.8).
554 You can look at this file by saying
562 are often used to search for information in this file.
563 See `finger (1)', `passwd(5)', and `grep (1)' for more details.
567 command is used to force termination of a shell script,
568 and is built into the shell (3.9).
570 A command which discovers a problem may reflect this back to the command
571 (such as a shell) which invoked (executed) it.
572 It does this by returning a non-zero number as its
574 a status of zero being considered
575 `normal termination'.
578 command can be used to force a shell command script to give a non-zero
582 The replacement of strings in the shell input which contain metacharacters
583 by other strings is referred to as the process of
585 Thus the replacement of the word `*' by a sorted list of files
586 in the current directory is a `filename expansion'.
587 Similarly the replacement of the characters `!!' by the text of
588 the last command is a `history expansion'.
590 are also referred to as
595 are used in the shell
596 to control the conditional structures used in the writing of shell
597 scripts and in calculating values for these scripts.
598 The operators available in shell
600 are those of the language
603 Filenames often consist of a
607 separated by the character `.'.
608 By convention, groups of related files often share the same
611 Thus if `prog.c' were a C program, then the object file for this
612 program would be stored in `prog.o'.
613 Similarly a paper written with the
615 nroff macro package might be stored in
617 while a formatted version of this paper might be kept in
618 `paper.out' and a list of spelling errors in
633 Each file in \s-2UNIX\s0 has a name consisting of up to 14 characters
634 and not including the character `/' which is used in
638 do not begin with the character `.', and contain
639 only letters and digits with perhaps a `.' separating the
646 .IP "filename expansion"
648 .I "Filename expansion"
649 uses the metacharacters `*', `?' and `[' and `]'
650 to provide a convenient mechanism for naming files.
652 .I "filename expansion"
653 it is easy to name all the files in
654 the current directory, or all files which have a common
657 .I "filename expansion"
658 mechanisms use the metacharacter `~' and allow
659 files in other users' directories to be named easily (1.6, 4.2).
661 Many \s-2UNIX\s0 commands accept arguments which are not the names
662 of files or other users but are used to modify the action of the commands.
663 These are referred to as
665 options, and by convention consist of one or more letters preceded by
666 the character `\-' (1.2).
669 (list files) command has an option
670 `\-s' to list the sizes of files.
678 command is used in shell scripts and at the terminal to specify
679 repetition of a sequence of commands while the value of a certain
680 shell variable ranges through a specified list (3.6, 4.1).
682 When commands are executing in the normal way such that the
683 shell is waiting for them to finish before prompting for another
684 command they are said to be
687 .I "running in the foreground" \&.
688 This is as opposed to
691 jobs can be stopped by signals
692 from the terminal caused by typing different
693 control characters at the keyboard (1.8, 2.6).
695 The shell has a command
697 used in shell scripts to transfer control to a given label (3.7).
701 command searches through a list of argument files for a specified string.
704 grep bill /etc/passwd
706 will print each line in the file
708 which contains the string `bill'.
712 .I "regular expressions"
713 in the sense of the editors
714 `ed (1)' and `ex (1)'.
718 .I "regular expression"
723 command prints the first few lines of one or more files.
724 If you have a bunch of files containing text which you are wondering
725 about it is sometimes useful to run
727 with these files as arguments.
728 This will usually show enough of what is in these files to let you decide
729 which you are interested in (1.5).
732 is also used to describe the part of a
734 before and including the last `/' character. The
738 is the part after the last `/'. The `:h' and `:t' modifiers allow the
744 stored in a shell variable to be used (3.6).
748 mechanism of the shell allows previous commands to be repeated,
749 possibly after modification to correct typing mistakes or to change
750 the meaning of the command.
753 where these commands are kept, and a
755 variable which controls how large this list is (2.3).
756 .IP "home\ directory"
759 .I "home directory" ,
760 which is given in your entry
761 in the password file,
763 This is the directory which you are placed in when you first login.
768 command with no arguments takes you back to this directory, whose
769 name is recorded in the shell variable
771 You can also access the
772 .I "home directories"
773 of other users in forming
775 .I "filename expansion"
776 notation and the character `~' (1.6).
778 A conditional command within the shell, the
780 command is used in shell command scripts to make decisions
781 about what course of action to take next (3.6).
783 Normally, your shell will exit, printing
785 if you type a control-d at a prompt of `% '.
786 This is the way you usually log off the system.
791 variable if you wish in your
793 file and then use the command
796 This is useful if you sometimes accidentally type too many control-d
797 characters, logging yourself off
800 Many commands on \s-2UNIX\s0 take information from the terminal or from
801 files which they then act on.
802 This information is called
804 Commands normally read for
808 which is, by default, the terminal.
811 can be redirected from a file using a shell metanotation
812 with the character `<'.
813 Many commands will also read from a file specified as argument.
816 will read from the output of the previous
819 The leftmost command in a
821 reads from the terminal if
822 you neither redirect its
824 nor give it a filename to use as
825 .I "standard input" .
826 Special mechanisms exist for supplying input to commands in shell
831 is a signal to a program that is generated by typing ^C. (On older versions
832 of UNIX the \s-2RUBOUT\s0 or \s-2DELETE\s0 key were used for this purpose.)
833 It causes most programs to stop execution.
834 Certain programs, such as the shell and the editors,
837 in special ways, usually by stopping what they
838 are doing and prompting for another command.
839 While the shell is executing another command and waiting for it
840 to finish, the shell does not listen to
842 The shell often wakes up when you hit
844 because many commands
845 die when they receive an
850 typed on the same input line separated by `|' or `;' characters
851 are run together and are called a
853 Simple commands run by themselves without any `|' or `;' characters
864 The builtin functions that control the execution of
868 .I "bg, fg, stop, kill"
872 is started it is assigned a small number called a
874 which is printed next to the job in the output of the
876 command. This number, preceded by a `%' character, can be used as an argument
880 a specific job (2.6).
884 command prints a table showing
885 jobs that are either running in the
891 A command which sends a
893 to a job causing it to terminate (2.6).
899 directory is read by the shell each time you login to \s-2UNIX\s0
900 and the commands there are executed.
901 There are a number of commands which are usefully placed here,
904 commands to the shell itself (2.1).
906 The shell that is started on your terminal when you login is called
909 It is different from other shells which you may run (e.g. on
913 file before reading commands from the terminal and it reads the
915 file after you logout
920 command causes a login shell to exit.
921 Normally, a login shell will exit when you hit control-d
923 .I end\f1-\fPof\f1-\fPfile,
928 file then this will not work and you must use
930 to log off the \s-2UNIX\s0 system (2.8).
932 When you log off of \s-2UNIX\s0 the shell will execute commands from
937 directory after it prints `logout'.
941 is the line printer daemon.
942 The standard input of
944 spooled and printed on the \s-2UNIX\s0 line printer.
947 a list of filenames as arguments to be printed.
948 It is most common to use
950 as the last component of a
956 (list files) command is one of the most commonly used \s-2UNIX\s0
958 With no argument filenames it prints the names of the files in the
960 It has a number of useful
962 arguments, and can also be given the names of directories
963 as arguments, in which case it lists the names of the files in these
968 program is used to send and receive messages from other \s-2UNIX\s0
969 users (1.1, 2.1), whether they are logged on or not.
973 command is used to maintain one or more related files and to
974 organize functions to be performed on these files.
977 is easier to use, and more helpful than
978 shell command scripts (3.2).
980 The file containing commands for
990 often referred to is the
991 `\s-2UNIX\s0 manual'.
992 It contains 8 numbered sections with a description of each \s-2UNIX\s0
993 program (section 1), system call (section 2), subroutine (section 3),
994 device (section 4), special data structure (section 5), game (section 6),
995 miscellaneous item (section 7) and system administration program (section 8).
996 There are also supplementary documents (tutorials and reference guides)
997 for individual programs which require explanation in more detail.
998 An online version of the
1000 is accessible through the
1003 Its documentation can be obtained online via
1007 If you can't decide what manual page to look in, try the
1010 The supplementary documents are in subdirectories of /usr/doc.
1013 Many characters which are neither letters nor digits have special meaning
1014 either to the shell or to \s-2UNIX\s0.
1015 These characters are called
1017 If it is necessary to place these characters in arguments to commands
1018 without them having their special meaning then they must be
1022 is the character `>' which is used
1023 to indicate placement of output into a file.
1024 For the purposes of the
1029 form separate words (1.4).
1030 The appendix to this user's manual lists the
1032 in groups by their function.
1036 command is used to create a new directory.
1038 Substitutions with the
1040 mechanism, keyed by the character `!'
1041 or of variables using the metacharacter `$', are often subjected
1042 to modifications, indicated by placing the character `:' after the
1043 substitution and following this with the
1047 .I "command substitution"
1048 mechanism can also be used to perform modification in a similar way,
1049 but this notation is less clear (3.6).
1053 writes a file on your terminal allowing you to control how much text
1054 is displayed at a time.
1056 can move through the file screenful by screenful, line by line,
1057 search forward for a string, or start again at the beginning of the file.
1058 It is generally the easiest way of viewing a file (1.8).
1060 The shell has a variable
1062 which may be set in the file
1064 to prevent accidental destruction of files by the `>' output redirection
1065 metasyntax of the shell (2.2, 2.5).
1069 is set to suppress the
1070 .I "filename expansion"
1071 of arguments containing the metacharacters `~', `*', `?', `[' and `]' (3.6).
1075 command tells the shell to report on the termination of a specific
1077 at the exact time it occurs as opposed to waiting
1078 until just before the next prompt to report the termination.
1081 variable, if set, causes the shell to always report the termination
1084 jobs exactly when they occur (2.6).
1088 command is built into the shell and is used to control the action
1089 of a shell command script when an
1091 signal is received (3.9).
1093 Many commands in \s-2UNIX\s0 result in some lines of text which are
1098 is usually placed on what is known as the
1099 .I "standard output"
1100 which is normally connected to the user's terminal.
1101 The shell has a syntax using the metacharacter `>' for redirecting
1103 .I "standard output"
1104 of a command to a file (1.3).
1107 mechanism and the metacharacter `|' it is also possible for
1109 .I "standard output"
1110 of one command to become the
1112 of another command (1.5).
1113 Certain commands such as the line printer daemon
1115 do not place their results on the
1116 .I "standard output"
1118 useful places such as on the line printer (2.3).
1121 command places its output on another user's terminal rather than its
1122 .I "standard output"
1124 Commands also have a
1125 .I "diagnostic output"
1126 where they write their error messages.
1127 Normally these go to the terminal even if the
1128 .I "standard output"
1129 has been sent to a file or another command, but it is possible
1130 to direct error diagnostics along with
1131 .I "standard output"
1132 using a special metanotation (2.5).
1134 The shell has a variable
1136 which gives the names of the directories in which it searches for
1137 the commands which it is given.
1138 It always checks first to see if the command it is given is
1139 built into the shell.
1140 If it is, then it need not search for the command as it can do it internally.
1141 If the command is not builtin, then the shell searches for a file
1142 with the name given in each of the directories in the
1144 variable, left to right.
1145 Since the normal definition of the
1149 path (. /usr/ucb /bin /usr/bin)
1151 the shell normally looks in the current directory, and then in
1152 the standard system directories `/usr/ucb', `/bin' and `/usr/bin' for the named
1154 If the command cannot be found the shell will print an error diagnostic.
1155 Scripts of shell commands will be executed using another shell to interpret
1156 them if they have `execute' permission set.
1157 This is normally true because a command of the form
1161 was executed to turn this execute permission on (3.3).
1162 If you add new commands to a directory in the
1169 A list of names, separated by `/' characters, forms a
1173 between successive `/' characters, names a directory
1178 which begin with the character `/' are interpreted relative
1181 directory in the filesystem.
1184 are interpreted relative to the current directory
1187 The last component of a
1189 may name a directory, but
1190 usually names a file.
1192 A group of commands which are connected together, the
1193 .I "standard output"
1194 of each connected to the
1201 mechanism used to connect these commands is indicated by
1202 the shell metacharacter `|' (1.5, 2.3).
1206 command changes the shell's
1207 .I "working directory"
1208 to the directory you most recently left using the
1210 command. It returns to the directory without having to type its name,
1211 forgetting the name of the current
1212 .I "working directory"
1213 before doing so (2.7).
1215 The part of a computer system to which each terminal is
1216 connected is called a
1218 Usually the system has a fixed number of
1220 some of which are connected to telephone lines
1221 for dial-up access, and some of which are permanently
1222 wired directly to specific terminals.
1226 command is used to prepare listings of the contents of files
1227 with headers giving the name of the file and the date and
1228 time at which the file was last modified (2.3).
1233 to print the current setting of variables in the environment
1236 An instance of a running program is called a
1239 \s-2UNIX\s0 assigns each
1241 a unique number when it is
1242 started \- called the
1243 .I "process number" .
1244 .I "Process numbers"
1245 can be used to stop individual
1253 are part of a detached
1257 Usually synonymous with
1259 a binary file or shell command script
1260 which performs a useful function is often
1264 Many programs will print a
1266 on the terminal when they expect input.
1268 `ex (1)' will print a `:' when it expects input.
1271 for input with `% ' and occasionally with `? ' when
1272 reading commands from the terminal (1.1).
1273 The shell has a variable
1275 which may be set to a different value to change the shell's main
1277 This is mostly used when debugging the shell (2.8).
1281 command, which means `push directory', changes the shell's
1282 .I "working directory"
1283 and also remembers the current
1284 .I "working directory"
1285 before the change is made, allowing you to return to the same
1288 command later without retyping its name (2.7).
1292 command is used to show the processes you are currently running.
1293 Each process is shown with its unique process number,
1294 an indication of the terminal name it is attached to,
1295 an indication of the state of the process (whether it is running,
1296 stopped, awaiting some event (sleeping), and whether it is swapped out),
1297 and the amount of \s-2CPU\s0 time it has used so far.
1298 The command is identified by printing some of the words used
1299 when it was invoked (2.6).
1304 command, are not normally shown in the output.
1308 command prints the full
1311 .I "working directory" \&.
1314 builtin command is usually a better and faster choice.
1318 signal, generated by a control-\e,
1319 is used to terminate programs which are behaving unreasonably.
1320 It normally produces a core image file (1.8).
1322 The process by which metacharacters are prevented their special
1323 meaning, usually by using the character `\' in pairs, or by
1324 using the character `\e', is referred to as
1328 The routing of input or output from or to a file is known
1331 of input or output (1.3).
1335 command tells the shell to rebuild its internal table of which commands
1336 are found in which directories in your
1338 This is necessary when a new program is installed in one of these
1340 .IP "relative pathname"
1344 which does not begin with a `/' is called a
1345 .I "relative pathname"
1346 since it is interpreted
1349 .I "working directory" .
1354 refers to some file or directory in the
1355 .I "working directory" ,
1358 between `/' characters refer to directories below the
1359 .I "working directory" .
1364 .I "absolute pathnames"
1369 command iterates another command a specified number of times.
1372 that is at the top of the entire directory structure is called the
1374 directory since it is the `root' of the entire tree structure of
1375 directories. The name used in
1381 starting with `/' are said to be
1383 since they start at the
1387 is also used as the part of a
1389 that is left after removing
1394 for a further explanation (1.6).
1396 The \s-2RUBOUT\s0 or \s-2DELETE\s0
1397 key is often used to erase the previously typed character; some users
1398 prefer the \s-2BACKSPACE\s0 for this purpose. On older versions of \s-2UNIX\s0
1399 this key served as the \s-2INTR\s0 character.
1401 Files whose names begin with a `#' are referred to as
1402 .I "scratch files" ,
1403 since they are automatically removed by the system after a couple of
1404 days of non-use, or more frequently if disk space becomes tight (1.3).
1406 Sequences of shell commands placed in a file are called shell command
1408 It is often possible to perform simple tasks using these
1410 without writing a program in a language such as C, by
1411 using the shell to selectively run other programs (3.3, 3.10).
1415 command is used to assign new values to shell variables
1416 and to show the values of the current variables.
1417 Many shell variables have special meaning to the shell itself.
1420 command the behavior of the shell can be affected (2.1).
1422 Variables in the environment `environ (5)'
1423 can be changed by using the
1425 builtin command (2.8).
1428 command can be used to print the value of the variables in the environment.
1432 is a command language interpreter.
1433 It is possible to write and run your own
1437 are no different than any other programs as far as the
1438 system is concerned.
1439 This manual deals with the details of one particular
1450 in \s-2UNIX\s0 is a short message that is sent to a running program
1451 which causes something to happen to that process.
1453 are sent either by typing special
1455 characters on the keyboard or by using the
1459 commands (1.8, 2.6).
1463 program sorts a sequence of lines in ways that can be controlled
1470 command causes the shell to read commands from a specified file.
1471 It is most useful for reading files such as
1473 after changing them (2.8).
1474 .IP "special character"
1479 appendix to this manual.
1481 We refer often to the
1484 .I "standard output"
1492 A command normally returns a
1497 of zero indicates that the command succeeded.
1498 Commands may return non-zero
1500 to indicate that some abnormal event has occurred.
1505 returned by the last command.
1506 It is most useful in shell commmand scripts (3.6).
1516 A sequential group of characters taken together is called a
1519 can contain any printable characters (2.2).
1523 program changes certain parameters inside \s-2UNIX\s0 which determine
1524 how your terminal is handled. See `stty (1)' for a complete description (2.6).
1526 The shell implements a number of
1528 where sequences indicated by metacharacters are replaced by other sequences.
1529 Notable examples of this are history
1532 metacharacter `!' and variable
1543 after a \s-2STOP\s0 signal is sent to it, either by typing a
1545 at the terminal (for
1547 jobs) or by using the
1553 a job temporarily stops running until it is restarted by either the
1561 command of the shell allows the shell
1562 to select one of a number of sequences of commands based on an
1564 It is similar to the
1566 statement in the language C (3.7).
1568 When a command which is being executed finishes we say it undergoes
1572 Commands normally terminate when they read an
1573 .I end\f1-\fPof\f1-\fPfile
1575 .I "standard input" .
1576 It is also possible to terminate commands by sending them
1584 program terminates specified jobs (2.6).
1588 command is part of the shell's
1589 `if-then-else-endif' control construct used in command scripts (3.6).
1593 command can be used to measure the amount of \s-2CPU\s0
1594 and real time consumed by a specified command as well
1595 as the amount of disk i/o, memory used, and number
1596 of page faults and swaps taken by the command (2.1, 2.8).
1600 program is used to set standard erase and kill characters
1601 and to tell the system what kind of terminal you are using.
1602 It is often invoked in a
1608 is a historical abbreviation for `teletype' which is frequently used
1609 in \s-2UNIX\s0 to indicate the
1611 to which a given terminal is connected. The
1613 command will print the name of the
1617 to which your terminal is presently connected.
1621 command removes aliases (2.8).
1623 \s-2UNIX\s0 is an operating system on which
1626 \s-2UNIX\s0 provides facilities which allow
1628 to invoke other programs such as editors and text formatters which
1629 you may wish to use.
1633 command removes the definitions of shell variables (2.2, 2.8).
1634 .IP "variable expansion"
1645 hold one or more strings as value.
1646 The most common use of
1648 is in controlling the behavior
1659 are also used in writing shell programs (shell command scripts)
1664 shell variable can be set to cause commands to be echoed
1665 after they are history expanded.
1666 This is often useful in debugging shell scripts.
1669 variable is set by the shell's
1671 command line option (3.10).
1675 program calculates the number of characters, words, and lines in the
1676 files whose names are given as arguments (2.6).
1680 builtin control construct is used in shell command scripts (3.7).
1682 A sequence of characters which forms an argument to a command is called
1685 Many characters which are neither letters, digits, `\-', `.' nor `/'
1688 all by themselves even if they are not surrounded
1690 Any sequence of characters may be made into a
1693 with `\'' characters
1694 except for the characters `\'' and `!' which require special treatment
1696 This process of placing special characters in
1698 without their special meaning is called
1700 .IP "working directory"
1702 At any given time you are in one particular directory, called
1704 .I "working directory" .
1705 This directory's name is printed by the
1707 command and the files listed by
1709 are the ones in this directory.
1711 .I "working directories"
1717 command is an obsolete way of communicating with other users who are logged in to
1718 \s-2UNIX\s0 (you have to take turns typing). If you are both using display
1719 terminals, use \fItalk\fP(1), which is much more pleasant.