home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / riscbsd / 1_1_contri / usd / 04_csh / csh_g < prev    next >
Encoding:
Text File  |  1986-05-23  |  40.9 KB  |  1,696 lines

  1. .\" Copyright (c) 1980 Regents of the University of California.
  2. .\" All rights reserved.  The Berkeley software License Agreement
  3. .\" specifies the terms and conditions for redistribution.
  4. .\"
  5. .\"    @(#)csh.g    6.1 (Berkeley) 5/23/86
  6. .\"
  7.  
  8. .SH
  9. Glossary
  10. .PP
  11. This glossary lists the most important terms introduced in the
  12. introduction to the
  13. shell and gives references to sections of the shell
  14. document for further information about them.
  15. References of the form
  16. `pr (1)'
  17. indicate that the command
  18. .I pr
  19. is in the \s-2UNIX\s0 User Reference manual in section 1.
  20. You can look at an online copy of its manual page by doing
  21. .DS
  22. man 1 pr
  23. .DE
  24. References of the form (2.5)
  25. indicate that more information can be found in section 2.5 of this
  26. manual.
  27. .IP \&\fB.\fR 15n
  28. Your current directory has the name `.' as well as the name printed
  29. by the command
  30. .I pwd;
  31. see also
  32. .I dirs.
  33. The current directory `.' is usually the first 
  34. .I component 
  35. of the search path contained in the variable
  36. .I path ,
  37. thus commands which are in `.' are found first (2.2).
  38. The character `.' is also used in separating 
  39. .I components 
  40. of filenames
  41. (1.6).
  42. The character `.' at the beginning of a 
  43. .I component 
  44. of a 
  45. .I pathname 
  46. is treated specially and not matched by the 
  47. .I "filename expansion"
  48. metacharacters `?', `*', and `[' `]' pairs (1.6).
  49. .IP \&\fB..\fR
  50. Each directory has a file `..' in it which is a reference to its
  51. parent directory.
  52. After changing into the directory with
  53. .I chdir ,
  54. i.e.
  55. .DS
  56. chdir paper
  57. .DE
  58. you can return to the parent directory by doing
  59. .DS
  60. chdir ..
  61. .DE
  62. The current directory is printed by
  63. .I pwd
  64. (2.7).
  65. .IP a.out
  66. Compilers which create executable images create them, by default, in the
  67. file 
  68. .I a.out.
  69. for historical reasons (2.3).
  70. .IP "absolute pathname"
  71. .br
  72. .I pathname 
  73. which begins with a `/' is
  74. .I absolute
  75. since it specifies the 
  76. .I path 
  77. of directories from the beginning
  78. of the entire directory system \- called the
  79. .I root
  80. directory.  
  81. .I Pathname s 
  82. which are not
  83. .I absolute
  84. are called
  85. .I relative
  86. (see definition of
  87. .I "relative pathname" )
  88. (1.6).
  89. .IP alias
  90. An
  91. .I alias
  92. specifies a shorter or different name for a \s-2UNIX\s0
  93. command, or a transformation on a command to be performed in
  94. the shell.
  95. The shell has a command
  96. .I alias
  97. which establishes 
  98. .I aliases 
  99. and can print their current values.
  100. The command
  101. .I unalias
  102. is used to remove 
  103. .I aliases 
  104. (2.4).
  105. .IP argument
  106. Commands in \s-2UNIX\s0 receive a list of 
  107. .I argument 
  108. words.
  109. Thus the command
  110. .DS
  111. echo a b c
  112. .DE
  113. consists of the
  114. .I "command name"
  115. `echo' and three 
  116. .I argument 
  117. words `a', `b' and `c'.
  118. The set of 
  119. .I arguments 
  120. after the
  121. .I "command name"
  122. is said to be the
  123. .I "argument list"
  124. of the command (1.1).
  125. .IP argv
  126. The list of arguments to a command written in the shell language
  127. (a shell script or shell procedure) is stored in a variable called
  128. .I argv
  129. within the shell.
  130. This name is taken from the conventional name in the
  131. C programming language (3.4).
  132. .IP background
  133. Commands started without waiting for them to complete are called
  134. .I background
  135. commands (2.6).
  136. .IP base
  137. A filename is sometimes thought of as consisting of a
  138. .I base
  139. part, before any `.' character, and an 
  140. .I extension 
  141. \- the part after
  142. the `.'.  See
  143. .I filename
  144. and
  145. .I extension
  146. (1.6) and basename (1).
  147. .IP bg
  148. The
  149. .I bg
  150. command causes a
  151. .I suspended 
  152. job to continue execution in the
  153. .I background
  154. (2.6).
  155. .IP bin
  156. A directory containing binaries of programs and shell scripts to be
  157. executed is typically called a 
  158. .I bin 
  159. directory.
  160. The standard system 
  161. .I bin 
  162. directories are `/bin' containing the most
  163. heavily used commands and `/usr/bin' which contains most other user
  164. programs.
  165. Programs developed at UC Berkeley live in `/usr/ucb', while locally
  166. written programs live in `/usr/local'.  Games are kept in the directory
  167. `/usr/games'.
  168. You can place binaries in any directory.
  169. If you wish to execute them often, the name of the directories
  170. should be a 
  171. .I component 
  172. of the variable
  173. .I path .
  174. .IP break
  175. .I Break
  176. is a builtin command used to exit from loops within the control
  177. structure of the shell (3.7).
  178. .IP breaksw
  179. The
  180. .I breaksw
  181. builtin command is used to exit from a
  182. .I switch
  183. control structure, like a
  184. .I break
  185. exits from loops (3.7).
  186. .IP builtin
  187. A command executed directly by the shell is called a
  188. .I builtin
  189. command.
  190. Most commands in \s-2UNIX\s0 are not built into the shell,
  191. but rather exist as files in 
  192. .I bin 
  193. directories.
  194. These commands are accessible because the directories in which
  195. they reside are named in the
  196. .I path
  197. variable.
  198. .IP case
  199. A
  200. .I case
  201. command is used as a label in a
  202. .I switch
  203. statement in the shell's control structure, similar to that of the
  204. language C.
  205. Details are given in the shell documentation `csh (1)' (3.7).
  206. .IP cat
  207. The
  208. .I cat
  209. program catenates a list of specified files on the 
  210. .I "standard output" .
  211. It is usually used to look at the contents of a single file on the terminal,
  212. to `cat a file' (1.8, 2.3).
  213. .IP cd
  214. The
  215. .I cd
  216. command is used to change the 
  217. .I "working directory" .
  218. With no arguments,
  219. .I cd
  220. changes your 
  221. .I "working directory" 
  222. to be your
  223. .I home
  224. directory (2.4, 2.7).
  225. .IP chdir
  226. The
  227. .I chdir
  228. command is a synonym for
  229. .I cd .
  230. .I Cd
  231. is usually used because it is easier to type.
  232. .IP chsh
  233. The
  234. .I chsh
  235. command is used to change the shell which you use on \s-2UNIX\s0.
  236. By default, you use an different version of the shell
  237. which resides in `/bin/sh'.
  238. You can change your shell to `/bin/csh' by doing
  239. .DS
  240. chsh your-login-name /bin/csh
  241. .DE
  242. Thus I would do
  243. .DS
  244. chsh bill /bin/csh
  245. .DE
  246. It is only necessary to do this once.
  247. The next time you log in to \s-2UNIX\s0 after doing this command,
  248. you will be using
  249. .I csh
  250. rather than the shell in `/bin/sh' (1.9).
  251. .IP cmp
  252. .I Cmp
  253. is a program which compares files.
  254. It is usually used on binary files, or to see if two files are identical (3.6).
  255. For comparing text files the program
  256. .I diff ,
  257. described in `diff (1)' is used.
  258. .IP command
  259. A function performed by the system, either by the shell
  260. (a builtin 
  261. .I command )
  262. or by a program residing in a file in
  263. a directory within the \s-2UNIX\s0 system, is called a
  264. .I command
  265. (1.1).
  266. .IP "command name"
  267. .br
  268. When a command is issued, it consists of a
  269. .I "command name" ,
  270. which is the first word of the command,
  271. followed by arguments.
  272. The convention on \s-2UNIX\s0 is that the first word of a
  273. command names the function to be performed (1.1).
  274. .IP "command substitution"
  275. .br
  276. The replacement of a command enclosed in `\`' characters
  277. by the text output by that command 
  278. is called
  279. .I "command substitution"
  280. (4.3).
  281. .IP component
  282. A part of a
  283. .I pathname
  284. between `/' characters is called a
  285. .I component
  286. of that 
  287. .I pathname .
  288. A variable
  289. which has multiple strings as value is said to have
  290. several
  291. .I component s;
  292. each string is a
  293. .I component
  294. of the variable.
  295. .IP continue
  296. A builtin command which causes execution of the enclosing
  297. .I foreach
  298. or
  299. .I while
  300. loop to cycle prematurely.
  301. Similar to the
  302. .I continue
  303. command in the programming language C (3.6).
  304. .IP control-
  305. Certain special characters, called
  306. .I control
  307. characters, are produced by holding down the \s-2CONTROL\s0 key
  308. on your terminal and simultaneously pressing another character, much like
  309. the \s-2SHIFT\s0 key is used to produce upper case characters. Thus
  310. .I control- c
  311. is produced by holding down the \s-2CONTROL\s0 key while pressing the
  312. `c' key.  Usually \s-2UNIX\s0 prints an caret (^) followed by the
  313. corresponding letter when you type a
  314. .I control
  315. character (e.g. `^C' for
  316. .I control- c
  317. (1.8).
  318. .IP "core\ dump"
  319. When a program terminates abnormally, the system places an image
  320. of its current state in a file named `core'.
  321. This 
  322. .I "core dump"
  323. can be examined with the system debugger `adb (1)'
  324. or `sdb (1)' in order to determine what went wrong with the program (1.8).
  325. If the shell produces a message of the form
  326. .DS
  327. Illegal instruction (core dumped)
  328. .DE
  329. (where `Illegal instruction' is only one of several possible
  330. messages), you should report this to the author of the program
  331. or a system administrator, 
  332. saving the `core' file.
  333. .IP cp
  334. The
  335. .I cp
  336. (copy) program is used to copy the contents of one file into another
  337. file.
  338. It is one of the most commonly used \s-2UNIX\s0 commands (1.6).
  339. .IP csh
  340. The name of the shell
  341. program that this document describes.
  342. .IP \&.cshrc
  343. The file
  344. .I \&.cshrc
  345. in your
  346. .I home
  347. directory is read by each shell as it begins execution.
  348. It is usually used to change the setting of the variable
  349. .I path
  350. and to set
  351. .I alias
  352. parameters which are to take effect globally (2.1).
  353. .IP cwd
  354. The
  355. .I cwd
  356. variable in the shell holds the
  357. .I "absolute pathname"
  358. of the current
  359. .I "working directory" \&.
  360. It is changed by the shell whenever your current
  361. .I "working directory"
  362. changes and should not be changed otherwise (2.2).
  363. .IP date
  364. The
  365. .I date
  366. command prints the current date and time (1.3).
  367. .IP debugging
  368. .I Debugging
  369. is the process of correcting mistakes in programs and shell scripts.
  370. The shell has several options and variables which may be used
  371. to aid in shell 
  372. .I debugging 
  373. (4.4).
  374. .IP default:
  375. The label
  376. .I default:
  377. is used within shell
  378. .I switch
  379. statements, as it is in the C language
  380. to label the code to be executed if none of the
  381. .I case
  382. labels matches the value switched on (3.7).
  383. .IP \s-2DELETE\s0
  384. The
  385. \s-2DELETE\s0
  386. or
  387. \s-2RUBOUT\s0
  388. key on the terminal normally causes an interrupt to be sent to the current job.
  389. Many users change the interrupt character to be ^C.
  390. .IP detached
  391. A command that continues running in the 
  392. .I background 
  393. after you logout is said to be 
  394. .I detached .
  395. .IP diagnostic
  396. An error message produced by a program is often referred to as a
  397. .I diagnostic .
  398. Most error messages are not written to the 
  399. .I "standard output" ,
  400. since that is often directed away from the terminal (1.3, 1.5).
  401. Error messsages are instead written to the
  402. .I "diagnostic output"
  403. which may be directed away from the terminal, but usually is not.
  404. Thus 
  405. .I diagnostics 
  406. will usually appear on the terminal (2.5).
  407. .IP directory
  408. A structure which contains files.
  409. At any time you are in one particular 
  410. .I directory 
  411. whose names can be printed by the command 
  412. .I pwd .
  413. The
  414. .I chdir
  415. command will change you to another 
  416. .I directory , 
  417. and make the files
  418. in that 
  419. .I directory 
  420. visible. The 
  421. .I directory 
  422. in which you are when you first login is your
  423. .I home
  424. directory (1.1, 2.7).
  425. .IP "directory\ stack"
  426. The shell saves the names of previous
  427. .I "working directories"
  428. in the
  429. .I "directory stack"
  430. when you change your current
  431. .I "working directory"
  432. via the
  433. .I pushd
  434. command.  The
  435. .I "directory stack"
  436. can be printed by using the
  437. .I dirs
  438. command, which includes your current
  439. .I "working directory"
  440. as the first directory name on the left (2.7).
  441. .IP dirs
  442. The
  443. .I dirs
  444. command prints the shell's
  445. .I "directory stack" 
  446. (2.7).
  447. .IP du
  448. The
  449. .I du
  450. command is a program (described in `du (1)') which
  451. prints the number of disk blocks is all directories below
  452. and including your current
  453. .I "working directory"
  454. (2.6).
  455. .IP echo
  456. The
  457. .I echo
  458. command prints its arguments (1.6, 3.6).
  459. .IP else
  460. The
  461. .I else
  462. command is part of the `if-then-else-endif' control
  463. command construct (3.6).
  464. .IP endif
  465. If an
  466. .I if
  467. statement is ended with the word
  468. .I then ,
  469. all lines following the
  470. .I if
  471. up to a line starting with the word
  472. .I endif
  473. or
  474. .I else
  475. are executed if the condition between parentheses after the
  476. .I if
  477. is true (3.6).
  478. .IP \s-2EOF\s0
  479. An
  480. .I "end\f1-\fPof\f1-\fPfile"
  481. is generated by the terminal by a control-d,
  482. and whenever a command reads to the end of a file which
  483. it has been given as input.
  484. Commands receiving input from a
  485. .I pipe
  486. receive an 
  487. .I "end\f1-\fPof\f1-\fPfile" 
  488. when the command sending them input completes.
  489. Most commands terminate when they receive an 
  490. .I "end\f1-\fPof\f1-\fPfile" .
  491. The shell has an option to ignore 
  492. .I "end\f1-\fPof\f1-\fPfile" 
  493. from a terminal
  494. input which may help you keep from logging out accidentally
  495. by typing too many control-d's (1.1, 1.8, 3.8).
  496. .IP escape
  497. A character `\e' used to prevent the special meaning of a metacharacter
  498. is said to
  499. .I escape
  500. the character from its special meaning.
  501. Thus
  502. .DS
  503. echo \e*
  504. .DE
  505. will echo the character `*' while just
  506. .DS
  507. echo *
  508. .DE
  509. will echo the names of the file in the current directory.
  510. In this example, \e
  511. .I escape s
  512. `*' (1.7).
  513. There is also a non-printing character called
  514. .I escape , 
  515. usually labelled
  516. \s-2ESC\s0
  517. or
  518. \s-2ALTMODE\s0
  519. on terminal keyboards.
  520. Some older \s-2UNIX\s0 systems use this character to indicate that
  521. output is to be 
  522. .I suspended . 
  523. Most systems use control-s to stop the output and control-q to start it.
  524. .IP /etc/passwd
  525. This file contains information about the accounts currently on the
  526. system.
  527. It consists of a line for each account with fields separated by
  528. `:' characters (1.8).
  529. You can look at this file by saying
  530. .DS
  531. cat /etc/passwd
  532. .DE
  533. The commands
  534. .I finger
  535. and
  536. .I grep
  537. are often used to search for information in this file.
  538. See `finger (1)', `passwd(5)', and `grep (1)' for more details.
  539. .IP exit
  540. The
  541. .I exit
  542. command is used to force termination of a shell script,
  543. and is built into the shell (3.9).
  544. .IP "exit\ status"
  545. A command which discovers a problem may reflect this back to the command
  546. (such as a shell) which invoked (executed) it.
  547. It does this by returning a non-zero number as its
  548. .I "exit status" ,
  549. a status of zero being considered
  550. `normal termination'.
  551. The
  552. .I exit
  553. command can be used to force a shell command script to give a non-zero
  554. .I "exit status" 
  555. (3.6).
  556. .IP expansion
  557. The replacement of strings in the shell input which contain metacharacters
  558. by other strings is referred to as the process of
  559. .I expansion .
  560. Thus the replacement of the word `*' by a sorted list of files
  561. in the current directory is a `filename expansion'.
  562. Similarly the replacement of the characters `!!' by the text of
  563. the last command is a `history expansion'.
  564. .I Expansions 
  565. are also referred to as
  566. .I substitutions
  567. (1.6, 3.4, 4.2).
  568. .IP expressions
  569. .I Expressions 
  570. are used in the shell
  571. to control the conditional structures used in the writing of shell
  572. scripts and in calculating values for these scripts.
  573. The operators available in shell 
  574. .I expressions 
  575. are those of the language
  576. C (3.5).
  577. .IP extension
  578. Filenames often consist of a
  579. .I base
  580. name and an
  581. .I extension
  582. separated by the character `.'.
  583. By convention, groups of related files often share the same 
  584. .I root 
  585. name.
  586. Thus if `prog.c' were a C program, then the object file for this
  587. program would be stored in `prog.o'.
  588. Similarly a paper written with the
  589. `\-me'
  590. nroff macro package might be stored in
  591. `paper.me'
  592. while a formatted version of this paper might be kept in
  593. `paper.out' and a list of spelling errors in
  594. `paper.errs' (1.6).
  595. .IP fg
  596. The
  597. .I "job control"
  598. command
  599. .I fg
  600. is used to run a
  601. .I background
  602. or
  603. .I suspended
  604. job in the
  605. .I foreground
  606. (1.8, 2.6).
  607. .IP filename
  608. Each file in \s-2UNIX\s0 has a name consisting of up to 14 characters
  609. and not including the character `/' which is used in
  610. .I pathname
  611. building.  Most 
  612. .I filenames
  613. do not begin with the character `.', and contain 
  614. only letters and digits with perhaps a `.' separating the
  615. .I base
  616. portion of the 
  617. .I filename 
  618. from an 
  619. .I extension 
  620. (1.6).
  621. .IP "filename expansion"
  622. .br
  623. .I "Filename expansion" 
  624. uses the metacharacters `*', `?' and `[' and `]'
  625. to provide a convenient mechanism for naming files.
  626. Using 
  627. .I "filename expansion" 
  628. it is easy to name all the files in
  629. the current directory, or all files which have a common 
  630. .I root 
  631. name. Other 
  632. .I "filename expansion" 
  633. mechanisms use the metacharacter `~' and allow
  634. files in other users' directories to be named easily (1.6, 4.2).
  635. .IP flag
  636. Many \s-2UNIX\s0 commands accept arguments which are not the names
  637. of files or other users but are used to modify the action of the commands.
  638. These are referred to as
  639. .I flag
  640. options, and by convention consist of one or more letters preceded by
  641. the character `\-' (1.2).
  642. Thus the
  643. .I ls
  644. (list files) command has an option
  645. `\-s' to list the sizes of files.
  646. This is specified
  647. .DS
  648. ls \-s
  649. .DE
  650. .IP foreach
  651. The
  652. .I foreach
  653. command is used in shell scripts and at the terminal to specify
  654. repetition of a sequence of commands while the value of a certain
  655. shell variable ranges through a specified list (3.6, 4.1).
  656. .IP foreground
  657. When commands are executing in the normal way such that the
  658. shell is waiting for them to finish before prompting for another
  659. command they are said to be
  660. .I "foreground jobs"
  661. or
  662. .I "running in the foreground" \&.  
  663. This is as opposed to
  664. .I background .
  665. .I Foreground
  666. jobs can be stopped by signals
  667. from the terminal caused by typing different
  668. control characters at the keyboard (1.8, 2.6).
  669. .IP goto
  670. The shell has a command
  671. .I goto
  672. used in shell scripts to transfer control to a given label (3.7).
  673. .IP grep
  674. The
  675. .I grep
  676. command searches through a list of argument files for a specified string.
  677. Thus
  678. .DS
  679. grep bill /etc/passwd
  680. .DE
  681. will print each line in the file
  682. .I "/etc/passwd"
  683. which contains the string `bill'.
  684. Actually,
  685. .I grep
  686. scans for 
  687. .I "regular expressions"
  688. in the sense of the editors
  689. `ed (1)' and `ex (1)'.
  690. .I Grep
  691. stands for
  692. `globally find 
  693. .I "regular expression" 
  694. and print' (2.4).
  695. .IP head
  696. The
  697. .I head
  698. command prints the first few lines of one or more files.
  699. If you have a bunch of files containing text which you are wondering
  700. about it is sometimes useful to run
  701. .I head
  702. with these files as arguments.
  703. This will usually show enough of what is in these files to let you decide
  704. which you are interested in (1.5).
  705. .br
  706. .I Head
  707. is also used to describe the part of a
  708. .I pathname
  709. before and including the last `/' character.  The
  710. .I tail
  711. of a
  712. .I pathname
  713. is the part after the last `/'.  The `:h' and `:t' modifiers allow the
  714. .I head
  715. or
  716. .I tail
  717. of a 
  718. .I pathname 
  719. stored in a shell variable to be used (3.6).
  720. .IP history
  721. The
  722. .I history
  723. mechanism of the shell allows previous commands to be repeated,
  724. possibly after modification to correct typing mistakes or to change
  725. the meaning of the command.
  726. The shell has a
  727. .I "history list"
  728. where these commands are kept, and a
  729. .I history
  730. variable which controls how large this list is (2.3).
  731. .IP "home\ directory"
  732. .br
  733. Each user has a 
  734. .I "home directory" ,
  735. which is given in your entry
  736. in the password file,
  737. .I /etc/passwd .
  738. This is the directory which you are placed in when you first login.
  739. The
  740. .I cd
  741. or
  742. .I chdir
  743. command with no arguments takes you back to this directory, whose
  744. name is recorded in the shell variable
  745. .I home .
  746. You can also access the 
  747. .I "home directories" 
  748. of other users in forming
  749. filenames using a 
  750. .I "filename expansion" 
  751. notation and the character `~' (1.6).
  752. .IP if
  753. A conditional command within the shell, the
  754. .I if
  755. command is used in shell command scripts to make decisions
  756. about what course of action to take next (3.6).
  757. .IP ignoreeof
  758. Normally, your shell will exit, printing
  759. `logout'
  760. if you type a control-d at a prompt of `% '.
  761. This is the way you usually log off the system.
  762. You can
  763. .I set
  764. the
  765. .I ignoreeof
  766. variable if you wish in your
  767. .I \&.login
  768. file and then use the command
  769. .I logout
  770. to logout.
  771. This is useful if you sometimes accidentally type too many control-d
  772. characters, logging yourself off
  773. (2.2).
  774. .IP input
  775. Many commands on \s-2UNIX\s0 take information from the terminal or from
  776. files which they then act on.
  777. This information is called
  778. .I input .
  779. Commands normally read for 
  780. .I input 
  781. from their
  782. .I "standard input"
  783. which is, by default, the terminal.
  784. This 
  785. .I "standard input" 
  786. can be redirected from a file using a shell metanotation
  787. with the character `<'.
  788. Many commands will also read from a file specified as argument.
  789. Commands placed in 
  790. .I pipelines
  791. will read from the output of the previous
  792. command in the 
  793. .I pipeline .
  794. The leftmost command in a 
  795. .I pipeline 
  796. reads from the terminal if
  797. you neither redirect its 
  798. .I input 
  799. nor give it a filename to use as
  800. .I "standard input" .
  801. Special mechanisms exist for supplying input to commands in shell
  802. scripts (1.5, 3.8).
  803. .IP interrupt
  804. An
  805. .I interrupt
  806. is a signal to a program that is generated by typing ^C. (On older versions
  807. of UNIX the \s-2RUBOUT\s0 or \s-2DELETE\s0 key were used for this purpose.)
  808. It causes most programs to stop execution.
  809. Certain programs, such as the shell and the editors,
  810. handle an 
  811. .I interrupt 
  812. in special ways, usually by stopping what they
  813. are doing and prompting for another command.
  814. While the shell is executing another command and waiting for it
  815. to finish, the shell does not listen to 
  816. .I interrupts.
  817. The shell often wakes up when you hit 
  818. .I interrupt 
  819. because many commands
  820. die when they receive an 
  821. .I interrupt 
  822. (1.8, 3.9).
  823. .IP job
  824. One or more commands
  825. typed on the same input line separated by `|' or `;' characters
  826. are run together and are called a
  827. .I job \&.
  828. Simple commands run by themselves without any `|' or `;' characters
  829. are the simplest 
  830. .I jobs.
  831. .I Jobs
  832. are classified as
  833. .I foreground ,
  834. .I background ,
  835. or
  836. .I suspended
  837. (2.6).
  838. .IP "job\ control"
  839. The builtin functions that control the execution of
  840. jobs are called
  841. .I "job control"
  842. commands.  These are
  843. .I "bg, fg, stop, kill"
  844. (2.6).
  845. .IP "job\ number"
  846. When each job
  847. is started it is assigned a small number called a
  848. .I "job number"
  849. which is printed next to the job in the output of the
  850. .I jobs
  851. command.  This number, preceded by a `%' character, can be used as an argument
  852. to
  853. .I "job control"
  854. commands to indicate
  855. a specific job (2.6).
  856. .IP jobs
  857. The
  858. .I jobs
  859. command prints a table showing
  860. jobs that are either running in the
  861. .I background
  862. or are
  863. .I suspended
  864. (2.6).
  865. .IP kill
  866. A command which sends a
  867. signal
  868. to a job causing it to terminate (2.6).
  869. .IP \&.login
  870. The file
  871. .I \&.login
  872. in your
  873. .I home
  874. directory is read by the shell each time you login to \s-2UNIX\s0
  875. and the commands there are executed.
  876. There are a number of commands which are usefully placed here,
  877. especially
  878. .I set
  879. commands to the shell itself (2.1).
  880. .IP "login\ shell"
  881. The shell that is started on your terminal when you login is called
  882. your
  883. .I "login shell" .
  884. It is different from other shells which you may run (e.g. on
  885. shell scripts)
  886. in that it reads the
  887. .I \&.login
  888. file before reading commands from the terminal and it reads the
  889. .I \&.logout
  890. file after you logout
  891. (2.1).
  892. .IP logout
  893. The
  894. .I logout
  895. command causes a login shell to exit.
  896. Normally, a login shell will exit when you hit control-d
  897. generating an 
  898. .I end\f1-\fPof\f1-\fPfile, 
  899. but if you have set
  900. .I ignoreeof
  901. in you
  902. .I \&.login
  903. file then this will not work and you must use
  904. .I logout
  905. to log off the \s-2UNIX\s0 system (2.8).
  906. .IP \&.logout
  907. When you log off of \s-2UNIX\s0 the shell will execute commands from
  908. the file
  909. .I \&.logout
  910. in your
  911. .I home
  912. directory after it prints `logout'.
  913. .IP lpr
  914. The command
  915. .I lpr
  916. is the line printer daemon.
  917. The standard input of
  918. .I lpr
  919. spooled and printed on the \s-2UNIX\s0 line printer.
  920. You can also give
  921. .I lpr
  922. a list of filenames as arguments to be printed.
  923. It is most common to use
  924. .I lpr
  925. as the last component of a
  926. .I pipeline
  927. (2.3).
  928. .IP ls
  929. The
  930. .I ls
  931. (list files) command is one of the most commonly used \s-2UNIX\s0
  932. commands.
  933. With no argument filenames it prints the names of the files in the
  934. current directory.
  935. It has a number of useful
  936. .I flag
  937. arguments, and can also be given the names of directories
  938. as arguments, in which case it lists the names of the files in these
  939. directories (1.2).
  940. .IP mail
  941. The
  942. .I mail
  943. program is used to send and receive messages from other \s-2UNIX\s0
  944. users (1.1, 2.1), whether they are logged on or not.
  945. .IP make
  946. The
  947. .I make
  948. command is used to maintain one or more related files and to
  949. organize functions to be performed on these files. 
  950. In many ways
  951. .I make
  952. is easier to use, and more helpful than
  953. shell command scripts (3.2).
  954. .IP makefile
  955. The file containing commands for
  956. .I make
  957. is called
  958. .I makefile 
  959. or 
  960. .I Makefile
  961. (3.2).
  962. .IP manual
  963. The 
  964. .I manual 
  965. often referred to is the
  966. `\s-2UNIX\s0 manual'.
  967. It contains 8 numbered sections with a description of each \s-2UNIX\s0
  968. program (section 1), system call (section 2), subroutine (section 3),
  969. device (section 4), special data structure (section 5), game (section 6),
  970. miscellaneous item (section 7) and system administration program (section 8).
  971. There are also supplementary documents (tutorials and reference guides)
  972. for individual programs which require explanation in more detail.
  973. An online version of the 
  974. .I manual 
  975. is accessible through the
  976. .I man
  977. command.
  978. Its documentation can be obtained online via
  979. .DS
  980. man man
  981. .DE
  982. If you can't decide what manual page to look in, try the 
  983. .I apropos (1)
  984. command.
  985. The supplementary documents are in subdirectories of /usr/doc.
  986. .IP metacharacter
  987. .br
  988. Many characters which are neither letters nor digits have special meaning
  989. either to the shell or to \s-2UNIX\s0.
  990. These characters are called
  991. .I metacharacters .
  992. If it is necessary to place these characters in arguments to commands
  993. without them having their special meaning then they must be
  994. .I quoted .
  995. An example of a 
  996. .I metacharacter 
  997. is the character `>' which is used
  998. to indicate placement of output into a file.
  999. For the purposes of the
  1000. .I history
  1001. mechanism,
  1002. most unquoted 
  1003. .I metacharacters
  1004. form separate words (1.4).
  1005. The appendix to this user's manual lists the 
  1006. .I metacharacters
  1007. in groups by their function.
  1008. .IP mkdir
  1009. The
  1010. .I mkdir
  1011. command is used to create a new directory.
  1012. .IP modifier
  1013. Substitutions with the 
  1014. .I history 
  1015. mechanism, keyed by the character `!'
  1016. or of variables using the metacharacter `$', are often subjected
  1017. to modifications, indicated by placing the character `:' after the
  1018. substitution and following this with the 
  1019. .I modifier 
  1020. itself.
  1021. The
  1022. .I "command substitution"
  1023. mechanism can also be used to perform modification in a similar way,
  1024. but this notation is less clear (3.6).
  1025. .IP more
  1026. The program
  1027. .I more
  1028. writes a file on your terminal allowing you to control how much text
  1029. is displayed at a time.
  1030. .I More
  1031. can move through the file screenful by screenful, line by line,
  1032. search forward for a string, or start again at the beginning of the file.
  1033. It is generally the easiest way of viewing a file (1.8).
  1034. .IP noclobber
  1035. The shell has a variable
  1036. .I noclobber
  1037. which may be set in the file
  1038. .I \&.login
  1039. to prevent accidental destruction of files by the `>' output redirection
  1040. metasyntax of the shell (2.2, 2.5).
  1041. .IP noglob
  1042. The shell variable
  1043. .I noglob
  1044. is set to suppress the
  1045. .I "filename expansion"
  1046. of arguments containing the metacharacters `~', `*', `?', `[' and `]' (3.6).
  1047. .IP notify
  1048. The
  1049. .I notify
  1050. command tells the shell to report on the termination of a specific
  1051. .I "background job"
  1052. at the exact time it occurs as opposed to waiting
  1053. until just before the next prompt to report the termination.
  1054. The
  1055. .I notify
  1056. variable, if set, causes the shell to always report the termination
  1057. of
  1058. .I background 
  1059. jobs exactly when they occur (2.6).
  1060. .IP onintr
  1061. The
  1062. .I onintr
  1063. command is built into the shell and is used to control the action
  1064. of a shell command script when an 
  1065. .I interrupt 
  1066. signal is received (3.9).
  1067. .IP output
  1068. Many commands in \s-2UNIX\s0 result in some lines of text which are
  1069. called their
  1070. .I output.
  1071. This 
  1072. .I output 
  1073. is usually placed on what is known as the
  1074. .I "standard output"
  1075. which is normally connected to the user's terminal.
  1076. The shell has a syntax using the metacharacter `>' for redirecting
  1077. the 
  1078. .I "standard output" 
  1079. of a command to a file (1.3).
  1080. Using the
  1081. .I pipe
  1082. mechanism and the metacharacter `|' it is also possible for
  1083. the 
  1084. .I "standard output" 
  1085. of one command to become the 
  1086. .I "standard input" 
  1087. of another command (1.5).
  1088. Certain commands such as the line printer daemon
  1089. .I p
  1090. do not place their results on the 
  1091. .I "standard output" 
  1092. but rather in more
  1093. useful places such as on the line printer (2.3).
  1094. Similarly the
  1095. .I write
  1096. command places its output on another user's terminal rather than its
  1097. .I "standard output" 
  1098. (2.3).
  1099. Commands also have a
  1100. .I "diagnostic output"
  1101. where they write their error messages.
  1102. Normally these go to the terminal even if the 
  1103. .I "standard output" 
  1104. has been sent to a file or another command, but it is possible
  1105. to direct error diagnostics along with 
  1106. .I "standard output" 
  1107. using a special metanotation (2.5).
  1108. .IP path
  1109. The shell has a variable
  1110. .I path
  1111. which gives the names of the directories in which it searches for
  1112. the commands which it is given.
  1113. It always checks first to see if the command it is given is
  1114. built into the shell.
  1115. If it is, then it need not search for the command as it can do it internally.
  1116. If the command is not builtin, then the shell searches for a file
  1117. with the name given in each of the directories in the
  1118. .I path
  1119. variable, left to right.
  1120. Since the normal definition of the
  1121. .I path
  1122. variable is
  1123. .DS
  1124. path    (. /usr/ucb /bin /usr/bin)
  1125. .DE
  1126. the shell normally looks in the current directory, and then in
  1127. the standard system directories `/usr/ucb', `/bin' and `/usr/bin' for the named
  1128. command (2.2).
  1129. If the command cannot be found the shell will print an error diagnostic.
  1130. Scripts of shell commands will be executed using another shell to interpret
  1131. them if they have `execute' permission set.
  1132. This is normally true because a command of the form
  1133. .DS
  1134. chmod 755 script
  1135. .DE
  1136. was executed to turn this execute permission on (3.3).
  1137. If you add new commands to a directory in the 
  1138. .I path , 
  1139. you should issue
  1140. the command 
  1141. .I rehash 
  1142. (2.2).
  1143. .IP pathname
  1144. A list of names, separated by `/' characters, forms a
  1145. .I pathname.
  1146. Each
  1147. .I component,
  1148. between successive `/' characters, names a directory
  1149. in which the next 
  1150. .I component 
  1151. file resides.
  1152. .I Pathnames 
  1153. which begin with the character `/' are interpreted relative
  1154. to the
  1155. .I root
  1156. directory in the filesystem.
  1157. Other 
  1158. .I pathnames 
  1159. are interpreted relative to the current directory
  1160. as reported by
  1161. .I pwd.
  1162. The last component of a 
  1163. .I pathname 
  1164. may name a directory, but
  1165. usually names a file.
  1166. .IP pipeline
  1167. A group of commands which are connected together, the 
  1168. .I "standard output"
  1169. of each connected to the 
  1170. .I "standard input" 
  1171. of the next,
  1172. is called a
  1173. .I pipeline.
  1174. The
  1175. .I pipe
  1176. mechanism used to connect these commands is indicated by
  1177. the shell metacharacter `|' (1.5, 2.3).
  1178. .IP popd
  1179. The
  1180. .I popd
  1181. command changes the shell's
  1182. .I "working directory"
  1183. to the directory you most recently left using the
  1184. .I pushd
  1185. command.  It returns to the directory without having to type its name,
  1186. forgetting the name of the current
  1187. .I "working directory"
  1188. before doing so (2.7).
  1189. .IP port
  1190. The part of a computer system to which each terminal is
  1191. connected is called a
  1192. .I port .
  1193. Usually the system has a fixed number of
  1194. .I ports ,
  1195. some of which are connected to telephone lines
  1196. for dial-up access, and some of which are permanently
  1197. wired directly to specific terminals.
  1198. .IP pr
  1199. The
  1200. .I pr
  1201. command is used to prepare listings of the contents of files
  1202. with headers giving the name of the file and the date and
  1203. time at which the file was last modified (2.3).
  1204. .IP printenv
  1205. The
  1206. .I printenv
  1207. command is used
  1208. to print the current setting of variables in the environment
  1209. (2.8).
  1210. .IP process
  1211. An instance of a running program is called a 
  1212. .I process 
  1213. (2.6).
  1214. \s-2UNIX\s0 assigns each 
  1215. .I process 
  1216. a unique number when it is 
  1217. started \- called the
  1218. .I "process number" .
  1219. .I "Process numbers" 
  1220. can be used to stop individual 
  1221. .I processes
  1222. using the 
  1223. .I kill
  1224. or
  1225. .I stop
  1226. commands when the
  1227. .I processes
  1228. are part of a detached
  1229. .I background
  1230. job.
  1231. .IP program
  1232. Usually synonymous with
  1233. .I command ;
  1234. a binary file or shell command script
  1235. which performs a useful function is often
  1236. called a 
  1237. .I program .
  1238. .IP prompt
  1239. Many programs will print a 
  1240. .I prompt 
  1241. on the terminal when they expect input.
  1242. Thus the editor
  1243. `ex (1)' will print a `:' when it expects input.
  1244. The shell 
  1245. .I prompts
  1246. for input with `% ' and occasionally with `? ' when
  1247. reading commands from the terminal (1.1).
  1248. The shell has a variable
  1249. .I prompt
  1250. which may be set to a different value to change the shell's main 
  1251. .I prompt .
  1252. This is mostly used when debugging the shell (2.8).
  1253. .IP pushd
  1254. The
  1255. .I pushd
  1256. command, which means `push directory', changes the shell's
  1257. .I "working directory"
  1258. and also remembers the current
  1259. .I "working directory"
  1260. before the change is made, allowing you to return to the same
  1261. directory via the
  1262. .I popd
  1263. command later without retyping its name (2.7).
  1264. .IP ps
  1265. The
  1266. .I ps
  1267. command is used to show the processes you are currently running.
  1268. Each process is shown with its unique process number,
  1269. an indication of the terminal name it is attached to,
  1270. an indication of the state of the process (whether it is running,
  1271. stopped, awaiting some event (sleeping), and whether it is swapped out),
  1272. and the amount of \s-2CPU\s0 time it has used so far.
  1273. The command is identified by printing some of the words used
  1274. when it was invoked (2.6).
  1275. Shells, such as the
  1276. .I csh
  1277. you use to run the 
  1278. .I ps 
  1279. command, are not normally shown in the output.
  1280. .IP pwd
  1281. The
  1282. .I pwd
  1283. command prints the full 
  1284. .I pathname 
  1285. of the current
  1286. .I "working directory" \&.
  1287. The
  1288. .I dirs
  1289. builtin command is usually a better and faster choice.
  1290. .IP quit
  1291. The
  1292. .I quit
  1293. signal, generated by a control-\e,
  1294. is used to terminate programs which are behaving unreasonably.
  1295. It normally produces a core image file (1.8).
  1296. .IP quotation
  1297. The process by which metacharacters are prevented their special
  1298. meaning, usually by using the character `\' in pairs, or by
  1299. using the character `\e', is referred to as
  1300. .I quotation
  1301. (1.7).
  1302. .IP redirection
  1303. The routing of input or output from or to a file is known
  1304. as
  1305. .I redirection
  1306. of input or output (1.3).
  1307. .IP rehash
  1308. The
  1309. .I rehash
  1310. command tells the shell to rebuild its internal table of which commands
  1311. are found in which directories in your
  1312. .I path .
  1313. This is necessary when a new program is installed in one of these
  1314. directories (2.8).
  1315. .IP "relative pathname"
  1316. .br
  1317. A
  1318. .I pathname
  1319. which does not begin with a `/' is called a
  1320. .I "relative pathname"
  1321. since it is interpreted
  1322. .I relative
  1323. to the current 
  1324. .I "working directory" .
  1325. The first
  1326. .I component
  1327. of such a
  1328. .I pathname
  1329. refers to some file or directory in the
  1330. .I "working directory" ,
  1331. and subsequent
  1332. .I components
  1333. between `/' characters refer to directories below the
  1334. .I "working directory" .
  1335. .I Pathnames
  1336. that are not
  1337. .I relative
  1338. are called
  1339. .I "absolute pathnames"
  1340. (1.6).
  1341. .IP repeat
  1342. The
  1343. .I repeat
  1344. command iterates another command a specified number of times.
  1345. .IP root
  1346. The directory
  1347. that is at the top of the entire directory structure is called the
  1348. .I root
  1349. directory since it is the `root' of the entire tree structure of
  1350. directories.  The name used in
  1351. .I pathnames
  1352. to indicate the
  1353. .I root
  1354. is `/'.  
  1355. .I Pathnames 
  1356. starting with `/' are said to be
  1357. .I absolute
  1358. since they start at the
  1359. .I root
  1360. directory.
  1361. .I Root
  1362. is also used as the part of a 
  1363. .I pathname 
  1364. that is left after removing
  1365. the 
  1366. .I extension .
  1367. See
  1368. .I filename
  1369. for a further explanation (1.6).
  1370. .IP \s-2RUBOUT\s0
  1371. The \s-2RUBOUT\s0 or \s-2DELETE\s0
  1372. key is often used to erase the previously typed character; some users
  1373. prefer the \s-2BACKSPACE\s0 for this purpose.  On older versions of \s-2UNIX\s0
  1374. this key served as the \s-2INTR\s0 character.
  1375. .IP "scratch file"
  1376. Files whose names begin with a `#' are referred to as 
  1377. .I "scratch files" ,
  1378. since they are automatically removed by the system after a couple of
  1379. days of non-use, or more frequently if disk space becomes tight (1.3).
  1380. .IP script
  1381. Sequences of shell commands placed in a file are called shell command 
  1382. .I scripts .
  1383. It is often possible to perform simple tasks using these 
  1384. .I scripts 
  1385. without writing a program in a language such as C, by
  1386. using the shell to selectively run other programs (3.3, 3.10).
  1387. .IP set
  1388. The builtin
  1389. .I set
  1390. command is used to assign new values to shell variables
  1391. and to show the values of the current variables.
  1392. Many shell variables have special meaning to the shell itself.
  1393. Thus by using the 
  1394. .I set 
  1395. command the behavior of the shell can be affected (2.1).
  1396. .IP setenv
  1397. Variables in the environment `environ (5)'
  1398. can be changed by using the
  1399. .I setenv
  1400. builtin command (2.8).
  1401. The
  1402. .I printenv
  1403. command can be used to print the value of the variables in the environment.
  1404. .IP shell
  1405. .I shell 
  1406. is a command language interpreter.
  1407. It is possible to write and run your own 
  1408. .I shell ,
  1409. as 
  1410. .I shells 
  1411. are no different than any other programs as far as the
  1412. system is concerned.
  1413. This manual deals with the details of one particular 
  1414. .I shell ,
  1415. called
  1416. .I csh.
  1417. .IP "shell script"
  1418. See
  1419. .I script
  1420. (3.3, 3.10).
  1421. .IP signal
  1422. A
  1423. .I signal
  1424. in \s-2UNIX\s0 is a short message that is sent to a running program
  1425. which causes something to happen to that process.
  1426. .I Signals
  1427. are sent either by typing special
  1428. .I control
  1429. characters on the keyboard or by using the
  1430. .I kill
  1431. or
  1432. .I stop
  1433. commands (1.8, 2.6).
  1434. .IP sort
  1435. The
  1436. .I sort
  1437. program sorts a sequence of lines in ways that can be controlled
  1438. by argument 
  1439. .I flags 
  1440. (1.5).
  1441. .IP source
  1442. The
  1443. .I source
  1444. command causes the shell to read commands from a specified file.
  1445. It is most useful for reading files such as
  1446. .I \&.cshrc
  1447. after changing them (2.8).
  1448. .IP "special character"
  1449. .br
  1450. See
  1451. .I metacharacters
  1452. and the
  1453. appendix to this manual.
  1454. .IP standard
  1455. We refer often to the
  1456. .I "standard input"
  1457. and
  1458. .I "standard output"
  1459. of commands.
  1460. See
  1461. .I input
  1462. and
  1463. .I output
  1464. (1.3, 3.8).
  1465. .IP status
  1466. A command normally returns a
  1467. .I status
  1468. when it finishes.
  1469. By convention a
  1470. .I status
  1471. of zero indicates that the command succeeded.
  1472. Commands may return non-zero 
  1473. .I status 
  1474. to indicate that some abnormal event has occurred.
  1475. The shell variable
  1476. .I status
  1477. is set to the 
  1478. .I status 
  1479. returned by the last command.
  1480. It is most useful in shell commmand scripts (3.6).
  1481. .IP stop
  1482. The
  1483. .I stop
  1484. command causes a
  1485. .I background 
  1486. job to become 
  1487. .I suspended 
  1488. (2.6).
  1489. .IP string
  1490. A sequential group of characters taken together is called a
  1491. .I string \&.
  1492. .I Strings
  1493. can contain any printable characters (2.2).
  1494. .IP stty
  1495. The
  1496. .I stty
  1497. program changes certain parameters inside \s-2UNIX\s0 which determine
  1498. how your terminal is handled.  See `stty (1)' for a complete description (2.6).
  1499. .IP substitution
  1500. The shell implements a number of
  1501. .I substitutions
  1502. where sequences indicated by metacharacters are replaced by other sequences.
  1503. Notable examples of this are history 
  1504. .I substitution 
  1505. keyed by the
  1506. metacharacter `!' and variable 
  1507. .I substitution 
  1508. indicated by `$'.
  1509. We also refer to 
  1510. .I substitutions 
  1511. as
  1512. .I expansions
  1513. (3.4).
  1514. .IP suspended
  1515. A job becomes
  1516. .I suspended
  1517. after a \s-2STOP\s0 signal is sent to it, either by typing a
  1518. .I control -z
  1519. at the terminal (for
  1520. .I foreground
  1521. jobs) or by using the
  1522. .I stop
  1523. command (for
  1524. .I background
  1525. jobs).  When
  1526. .I suspended ,
  1527. a job temporarily stops running until it is restarted by either the
  1528. .I fg
  1529. or
  1530. .I bg
  1531. command (2.6).
  1532. .IP switch
  1533. The
  1534. .I switch
  1535. command of the shell allows the shell
  1536. to select one of a number of sequences of commands based on an
  1537. argument string.
  1538. It is similar to the
  1539. .I switch
  1540. statement in the language C (3.7).
  1541. .IP termination
  1542. When a command which is being executed finishes we say it undergoes
  1543. .I termination
  1544. or
  1545. .I terminates.
  1546. Commands normally terminate when they read an 
  1547. .I end\f1-\fPof\f1-\fPfile
  1548. from their 
  1549. .I "standard input" .
  1550. It is also possible to terminate commands by sending them
  1551. an
  1552. .I interrupt
  1553. or
  1554. .I quit
  1555. signal (1.8).
  1556. The
  1557. .I kill
  1558. program terminates specified jobs (2.6).
  1559. .IP then
  1560. The
  1561. .I then
  1562. command is part of the shell's
  1563. `if-then-else-endif' control construct used in command scripts (3.6).
  1564. .IP time
  1565. The
  1566. .I time
  1567. command can be used to measure the amount of \s-2CPU\s0
  1568. and real time consumed by a specified command as well
  1569. as the amount of disk i/o, memory utilized, and number
  1570. of page faults and swaps taken by the command (2.1, 2.8).
  1571. .IP tset
  1572. The
  1573. .I tset
  1574. program is used to set standard erase and kill characters
  1575. and to tell the system what kind of terminal you are using.
  1576. It is often invoked in a
  1577. .I \&.login
  1578. file (2.1).
  1579. .IP tty
  1580. The word
  1581. .I tty
  1582. is a historical abbreviation for `teletype' which is frequently used
  1583. in \s-2UNIX\s0 to indicate the
  1584. .I port
  1585. to which a given terminal is connected.  The
  1586. .I tty
  1587. command will print the name of the
  1588. .I tty
  1589. or
  1590. .I port
  1591. to which your terminal is presently connected.
  1592. .IP unalias
  1593. The
  1594. .I unalias
  1595. command removes aliases (2.8).
  1596. .IP \s-2UNIX\s0
  1597. \s-2UNIX\s0 is an operating system on which
  1598. .I csh
  1599. runs.
  1600. \s-2UNIX\s0 provides facilities which allow
  1601. .I csh
  1602. to invoke other programs such as editors and text formatters which
  1603. you may wish to use.
  1604. .IP unset
  1605. The
  1606. .I unset
  1607. command removes the definitions of shell variables (2.2, 2.8).
  1608. .IP "variable expansion"
  1609. .br
  1610. See
  1611. .I variables
  1612. and
  1613. .I expansion
  1614. (2.2, 3.4).
  1615. .IP variables
  1616. .I Variables 
  1617. in
  1618. .I csh
  1619. hold one or more strings as value.
  1620. The most common use of 
  1621. .I variables 
  1622. is in controlling the behavior
  1623. of the shell.
  1624. See
  1625. .I path ,
  1626. .I noclobber ,
  1627. and
  1628. .I ignoreeof
  1629. for examples.
  1630. .I Variables 
  1631. such as
  1632. .I argv
  1633. are also used in writing shell programs (shell command scripts)
  1634. (2.2).
  1635. .IP verbose
  1636. The
  1637. .I verbose
  1638. shell variable can be set to cause commands to be echoed
  1639. after they are history expanded.
  1640. This is often useful in debugging shell scripts.
  1641. The
  1642. .I verbose
  1643. variable is set by the shell's
  1644. .I \-v
  1645. command line option (3.10).
  1646. .IP wc
  1647. The
  1648. .I wc
  1649. program calculates the number of characters, words, and lines in the
  1650. files whose names are given as arguments (2.6).
  1651. .IP while
  1652. The
  1653. .I while
  1654. builtin control construct is used in shell command scripts (3.7).
  1655. .IP word
  1656. A sequence of characters which forms an argument to a command is called
  1657. a
  1658. .I word .
  1659. Many characters which are neither letters, digits, `\-', `.' nor `/'
  1660. form 
  1661. .I words 
  1662. all by themselves even if they are not surrounded
  1663. by blanks.
  1664. Any sequence of characters may be made into a 
  1665. .I word 
  1666. by surrounding it
  1667. with `\'' characters
  1668. except for the characters `\'' and `!' which require special treatment
  1669. (1.1).
  1670. This process of placing special characters in 
  1671. .I words 
  1672. without their special meaning is called
  1673. .I quoting .
  1674. .IP "working directory"
  1675. .br
  1676. At any given time you are in one particular directory, called
  1677. your 
  1678. .I "working directory" .
  1679. This directory's name is printed by the
  1680. .I pwd
  1681. command and the files listed by
  1682. .I ls
  1683. are the ones in this directory.
  1684. You can change 
  1685. .I "working directories" 
  1686. using
  1687. .I chdir .
  1688. .IP write
  1689. The
  1690. .I write
  1691. command is an obsolete way of communicating with other users who are logged in to
  1692. \s-2UNIX\s0 (you have to take turns typing).  If you are both using display 
  1693. terminals, use \fItalk\fP(1), which is much more pleasant.
  1694.