home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume26 / ssh-1.7 / part04 < prev    next >
SHell self-extracting ARchive  |  1993-04-15  |  58.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 75 6e 69 78 0a 46 72 |.sources|.unix.Fr|
|00000020| 6f 6d 3a 20 53 74 65 76 | 65 20 42 61 6b 65 72 20 |om: Stev|e Baker |
|00000030| 28 69 63 65 40 6a 75 64 | 79 2e 69 6e 64 73 74 61 |(ice@jud|y.indsta|
|00000040| 74 65 2e 65 64 75 29 0a | 53 75 62 6a 65 63 74 3a |te.edu).|Subject:|
|00000050| 20 76 32 36 69 31 37 30 | 3a 20 73 73 68 20 2d 20 | v26i170|: ssh - |
|00000060| 53 74 65 76 65 27 73 20 | 53 48 65 6c 6c 20 28 61 |Steve's |SHell (a|
|00000070| 20 73 6d 61 6c 6c 20 63 | 73 68 2d 6c 69 6b 65 20 | small c|sh-like |
|00000080| 73 68 65 6c 6c 29 2c 20 | 56 31 2e 37 2c 20 50 61 |shell), |V1.7, Pa|
|00000090| 72 74 30 34 2f 30 34 0a | 53 65 6e 64 65 72 3a 20 |rt04/04.|Sender: |
|000000a0| 75 6e 69 78 2d 73 6f 75 | 72 63 65 73 2d 6d 6f 64 |unix-sou|rces-mod|
|000000b0| 65 72 61 74 6f 72 40 76 | 69 78 2e 63 6f 6d 0a 41 |erator@v|ix.com.A|
|000000c0| 70 70 72 6f 76 65 64 3a | 20 70 61 75 6c 40 76 69 |pproved:| paul@vi|
|000000d0| 78 2e 63 6f 6d 0a 0a 53 | 75 62 6d 69 74 74 65 64 |x.com..S|ubmitted|
|000000e0| 2d 42 79 3a 20 53 74 65 | 76 65 20 42 61 6b 65 72 |-By: Ste|ve Baker|
|000000f0| 20 28 69 63 65 40 6a 75 | 64 79 2e 69 6e 64 73 74 | (ice@ju|dy.indst|
|00000100| 61 74 65 2e 65 64 75 29 | 0a 50 6f 73 74 69 6e 67 |ate.edu)|.Posting|
|00000110| 2d 4e 75 6d 62 65 72 3a | 20 56 6f 6c 75 6d 65 20 |-Number:| Volume |
|00000120| 32 36 2c 20 49 73 73 75 | 65 20 31 37 30 0a 41 72 |26, Issu|e 170.Ar|
|00000130| 63 68 69 76 65 2d 4e 61 | 6d 65 3a 20 73 73 68 2d |chive-Na|me: ssh-|
|00000140| 31 2e 37 2f 70 61 72 74 | 30 34 0a 0a 23 21 20 2f |1.7/part|04..#! /|
|00000150| 62 69 6e 2f 73 68 0a 23 | 20 54 68 69 73 20 69 73 |bin/sh.#| This is|
|00000160| 20 61 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 | a shell| archive|
|00000170| 2e 20 20 52 65 6d 6f 76 | 65 20 61 6e 79 74 68 69 |. Remov|e anythi|
|00000180| 6e 67 20 62 65 66 6f 72 | 65 20 74 68 69 73 20 6c |ng befor|e this l|
|00000190| 69 6e 65 2c 20 74 68 65 | 6e 20 75 6e 70 61 63 6b |ine, the|n unpack|
|000001a0| 0a 23 20 69 74 20 62 79 | 20 73 61 76 69 6e 67 20 |.# it by| saving |
|000001b0| 69 74 20 69 6e 74 6f 20 | 61 20 66 69 6c 65 20 61 |it into |a file a|
|000001c0| 6e 64 20 74 79 70 69 6e | 67 20 22 73 68 20 66 69 |nd typin|g "sh fi|
|000001d0| 6c 65 22 2e 20 20 54 6f | 20 6f 76 65 72 77 72 69 |le". To| overwri|
|000001e0| 74 65 20 65 78 69 73 74 | 69 6e 67 0a 23 20 66 69 |te exist|ing.# fi|
|000001f0| 6c 65 73 2c 20 74 79 70 | 65 20 22 73 68 20 66 69 |les, typ|e "sh fi|
|00000200| 6c 65 20 2d 63 22 2e 20 | 20 59 6f 75 20 63 61 6e |le -c". | You can|
|00000210| 20 61 6c 73 6f 20 66 65 | 65 64 20 74 68 69 73 20 | also fe|ed this |
|00000220| 61 73 20 73 74 61 6e 64 | 61 72 64 20 69 6e 70 75 |as stand|ard inpu|
|00000230| 74 20 76 69 61 0a 23 20 | 75 6e 73 68 61 72 2c 20 |t via.# |unshar, |
|00000240| 6f 72 20 62 79 20 74 79 | 70 69 6e 67 20 22 73 68 |or by ty|ping "sh|
|00000250| 20 3c 66 69 6c 65 22 2c | 20 65 2e 67 2e 2e 20 20 | <file",| e.g.. |
|00000260| 49 66 20 74 68 69 73 20 | 61 72 63 68 69 76 65 20 |If this |archive |
|00000270| 69 73 20 63 6f 6d 70 6c | 65 74 65 2c 20 79 6f 75 |is compl|ete, you|
|00000280| 0a 23 20 77 69 6c 6c 20 | 73 65 65 20 74 68 65 20 |.# will |see the |
|00000290| 66 6f 6c 6c 6f 77 69 6e | 67 20 6d 65 73 73 61 67 |followin|g messag|
|000002a0| 65 20 61 74 20 74 68 65 | 20 65 6e 64 3a 0a 23 09 |e at the| end:.#.|
|000002b0| 09 22 45 6e 64 20 6f 66 | 20 61 72 63 68 69 76 65 |."End of| archive|
|000002c0| 20 34 20 28 6f 66 20 34 | 29 2e 22 0a 23 20 43 6f | 4 (of 4|).".# Co|
|000002d0| 6e 74 65 6e 74 73 3a 20 | 20 73 73 68 2e 31 0a 23 |ntents: | ssh.1.#|
|000002e0| 20 57 72 61 70 70 65 64 | 20 62 79 20 76 69 78 69 | Wrapped| by vixi|
|000002f0| 65 40 67 77 2e 68 6f 6d | 65 2e 76 69 78 2e 63 6f |e@gw.hom|e.vix.co|
|00000300| 6d 20 6f 6e 20 54 68 75 | 20 41 70 72 20 31 35 20 |m on Thu| Apr 15 |
|00000310| 32 32 3a 34 39 3a 30 32 | 20 31 39 39 33 0a 50 41 |22:49:02| 1993.PA|
|00000320| 54 48 3d 2f 62 69 6e 3a | 2f 75 73 72 2f 62 69 6e |TH=/bin:|/usr/bin|
|00000330| 3a 2f 75 73 72 2f 75 63 | 62 20 3b 20 65 78 70 6f |:/usr/uc|b ; expo|
|00000340| 72 74 20 50 41 54 48 0a | 69 66 20 74 65 73 74 20 |rt PATH.|if test |
|00000350| 2d 66 20 27 73 73 68 2e | 31 27 20 2d 61 20 22 24 |-f 'ssh.|1' -a "$|
|00000360| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00000370| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00000380| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00000390| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|000003a0| 20 5c 22 27 73 73 68 2e | 31 27 5c 22 0a 65 6c 73 | \"'ssh.|1'\".els|
|000003b0| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|000003c0| 72 61 63 74 69 6e 67 20 | 5c 22 27 73 73 68 2e 31 |racting |\"'ssh.1|
|000003d0| 27 5c 22 20 5c 28 35 37 | 34 33 33 20 63 68 61 72 |'\" \(57|433 char|
|000003e0| 61 63 74 65 72 73 5c 29 | 0a 73 65 64 20 22 73 2f |acters\)|.sed "s/|
|000003f0| 5e 58 2f 2f 22 20 3e 27 | 73 73 68 2e 31 27 20 3c |^X//" >'|ssh.1' <|
|00000400| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|00000410| 2e 5c 22 20 24 43 6f 70 | 79 72 69 67 68 74 3a 09 |.\" $Cop|yright:.|
|00000420| 24 0a 58 2e 5c 22 20 43 | 6f 70 79 72 69 67 68 74 |$.X.\" C|opyright|
|00000430| 20 28 63 29 20 31 39 39 | 31 2c 31 39 39 32 2c 31 | (c) 199|1,1992,1|
|00000440| 39 39 33 20 62 79 20 53 | 74 65 76 65 20 42 61 6b |993 by S|teve Bak|
|00000450| 65 72 0a 58 2e 5c 22 20 | 41 6c 6c 20 72 69 67 68 |er.X.\" |All righ|
|00000460| 74 73 20 72 65 73 65 72 | 76 65 64 0a 58 2e 5c 22 |ts reser|ved.X.\"|
|00000470| 20 0a 58 2e 5c 22 20 54 | 68 69 73 20 73 6f 66 74 | .X.\" T|his soft|
|00000480| 77 61 72 65 20 69 73 20 | 70 72 6f 76 69 64 65 64 |ware is |provided|
|00000490| 20 61 73 20 69 73 20 77 | 69 74 68 6f 75 74 20 61 | as is w|ithout a|
|000004a0| 6e 79 20 65 78 70 72 65 | 73 73 20 6f 72 20 69 6d |ny expre|ss or im|
|000004b0| 70 6c 69 65 64 0a 58 2e | 5c 22 20 77 61 72 72 61 |plied.X.|\" warra|
|000004c0| 6e 74 69 65 73 2c 20 69 | 6e 63 6c 75 64 69 6e 67 |nties, i|ncluding|
|000004d0| 2c 20 77 69 74 68 6f 75 | 74 20 6c 69 6d 69 74 61 |, withou|t limita|
|000004e0| 74 69 6f 6e 2c 20 74 68 | 65 20 69 6d 70 6c 69 65 |tion, th|e implie|
|000004f0| 64 20 77 61 72 72 61 6e | 74 69 65 73 0a 58 2e 5c |d warran|ties.X.\|
|00000500| 22 20 6f 66 20 6d 65 72 | 63 68 61 6e 74 61 62 69 |" of mer|chantabi|
|00000510| 6c 69 74 79 20 61 6e 64 | 20 66 69 74 6e 65 73 73 |lity and| fitness|
|00000520| 20 66 6f 72 20 61 20 70 | 61 72 74 69 63 75 6c 61 | for a p|articula|
|00000530| 72 20 70 75 72 70 6f 73 | 65 2e 0a 58 2e 2e 2e 0a |r purpos|e..X....|
|00000540| 58 2e 56 3d 20 24 48 65 | 61 64 65 72 3a 20 73 73 |X.V= $He|ader: ss|
|00000550| 68 2e 31 20 31 2e 37 20 | 31 39 39 33 20 24 0a 58 |h.1 1.7 |1993 $.X|
|00000560| 2e 54 48 20 53 53 48 20 | 31 20 22 5c 2a 28 56 29 |.TH SSH |1 "\*(V)|
|00000570| 22 20 22 55 4e 49 58 20 | 50 72 6f 67 72 61 6d 6d |" "UNIX |Programm|
|00000580| 65 72 27 73 20 4d 61 6e | 75 61 6c 22 0a 58 2e 53 |er's Man|ual".X.S|
|00000590| 48 20 4e 41 4d 45 0a 73 | 73 68 20 5c 2d 20 61 6e |H NAME.s|sh \- an|
|000005a0| 6f 74 68 65 72 20 55 4e | 49 58 20 73 68 65 6c 6c |other UN|IX shell|
|000005b0| 0a 58 2e 53 48 20 53 59 | 4e 4f 50 53 49 53 0a 58 |.X.SH SY|NOPSIS.X|
|000005c0| 2e 42 20 73 73 68 0a 58 | 5b 20 5c 2d 63 65 66 6e |.B ssh.X|[ \-cefn|
|000005d0| 74 78 76 58 56 20 5d 20 | 5b 20 61 72 67 20 2e 2e |txvXV ] |[ arg ..|
|000005e0| 2e 20 5d 0a 58 2e 53 48 | 20 44 45 53 43 52 49 50 |. ].X.SH| DESCRIP|
|000005f0| 54 49 4f 4e 0a 58 2e 49 | 20 53 73 68 0a 6f 72 20 |TION.X.I| Ssh.or |
|00000600| 53 74 65 76 65 27 73 20 | 53 48 65 6c 6c 20 69 73 |Steve's |SHell is|
|00000610| 20 61 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f | a imple|mentatio|
|00000620| 6e 20 6f 66 20 61 20 63 | 6f 6d 6d 61 6e 64 20 6c |n of a c|ommand l|
|00000630| 69 6e 65 20 69 6e 74 65 | 72 70 72 65 74 65 72 20 |ine inte|rpreter |
|00000640| 75 73 69 6e 67 0a 58 2e | 49 20 63 73 68 0a 6c 69 |using.X.|I csh.li|
|00000650| 6b 65 20 6a 6f 62 20 63 | 6f 6e 74 72 6f 6c 20 61 |ke job c|ontrol a|
|00000660| 6e 64 20 63 6f 6d 6d 61 | 6e 64 73 2e 0a 58 2e 49 |nd comma|nds..X.I|
|00000670| 20 53 73 68 0a 66 65 61 | 74 75 72 65 73 20 61 64 | Ssh.fea|tures ad|
|00000680| 76 61 6e 63 65 64 20 61 | 6c 69 61 73 20 61 6e 64 |vanced a|lias and|
|00000690| 20 76 61 72 69 61 62 6c | 65 0a 70 61 72 73 69 6e | variabl|e.parsin|
|000006a0| 67 2c 20 6c 6f 67 69 63 | 61 6c 20 61 73 73 69 67 |g, logic|al assig|
|000006b0| 6e 6d 65 6e 74 73 2c 20 | 43 20 6c 69 6b 65 20 6d |nments, |C like m|
|000006c0| 61 74 68 65 6d 61 74 69 | 63 61 6c 20 65 78 70 72 |athemati|cal expr|
|000006d0| 65 73 73 69 6f 6e 73 2c | 20 61 64 76 61 6e 63 65 |essions,| advance|
|000006e0| 64 20 6b 65 79 0a 6d 61 | 63 72 6f 20 73 75 70 70 |d key.ma|cro supp|
|000006f0| 6f 72 74 20 61 6e 64 20 | 63 6f 6d 6d 61 6e 64 20 |ort and |command |
|00000700| 6c 69 6e 65 20 65 64 69 | 74 69 6e 67 20 77 69 74 |line edi|ting wit|
|00000710| 68 20 6f 76 65 72 20 32 | 30 20 65 64 69 74 69 6e |h over 2|0 editin|
|00000720| 67 20 66 75 6e 63 74 69 | 6f 6e 73 2c 0a 73 6f 70 |g functi|ons,.sop|
|00000730| 68 69 73 74 69 63 61 74 | 65 64 20 66 69 6c 65 20 |histicat|ed file |
|00000740| 77 69 6c 64 63 61 72 64 | 20 65 78 70 72 65 73 73 |wildcard| express|
|00000750| 69 6f 6e 20 70 61 72 73 | 69 6e 67 20 61 6e 64 20 |ion pars|ing and |
|00000760| 61 6e 20 61 64 76 61 6e | 63 65 64 20 73 63 72 69 |an advan|ced scri|
|00000770| 70 74 0a 6c 61 6e 67 75 | 61 67 65 2e 0a 58 0a 49 |pt.langu|age..X.I|
|00000780| 66 20 61 6e 20 69 6e 73 | 74 61 6e 63 65 20 6f 66 |f an ins|tance of|
|00000790| 0a 58 2e 49 20 73 73 68 | 0a 69 73 20 61 20 6c 6f |.X.I ssh|.is a lo|
|000007a0| 67 69 6e 20 73 68 65 6c | 6c 2c 20 69 74 20 66 69 |gin shel|l, it fi|
|000007b0| 72 73 74 20 65 78 65 63 | 75 74 65 73 20 63 6f 6d |rst exec|utes com|
|000007c0| 6d 61 6e 64 73 20 66 6f | 75 6e 64 20 69 6e 20 74 |mands fo|und in t|
|000007d0| 68 65 20 66 69 6c 65 0a | 58 2e 49 20 2f 65 74 63 |he file.|X.I /etc|
|000007e0| 2f 2e 73 73 68 72 63 2e | 0a 49 74 20 74 68 65 6e |/.sshrc.|.It then|
|000007f0| 20 63 68 65 63 6b 73 20 | 66 6f 72 20 74 68 65 20 | checks |for the |
|00000800| 65 78 69 73 74 65 6e 63 | 65 20 6f 66 20 74 68 65 |existenc|e of the|
|00000810| 20 66 69 6c 65 0a 58 2e | 49 20 2e 73 65 63 6f 6e | file.X.|I .secon|
|00000820| 64 0a 69 6e 20 74 68 65 | 20 75 73 65 72 73 20 68 |d.in the| users h|
|00000830| 6f 6d 65 20 64 69 72 65 | 63 74 6f 72 79 2e 20 20 |ome dire|ctory. |
|00000840| 49 66 20 74 68 65 20 66 | 69 6c 65 20 65 78 69 73 |If the f|ile exis|
|00000850| 74 73 20 61 20 70 61 73 | 73 77 6f 72 64 20 69 73 |ts a pas|sword is|
|00000860| 20 72 65 61 64 20 6f 75 | 74 0a 6f 66 20 74 68 65 | read ou|t.of the|
|00000870| 20 66 69 6c 65 20 61 6e | 64 20 74 68 65 20 75 73 | file an|d the us|
|00000880| 65 72 20 69 73 20 70 72 | 6f 6d 70 74 65 64 20 66 |er is pr|ompted f|
|00000890| 6f 72 20 74 68 65 20 70 | 61 73 73 77 6f 72 64 2e |or the p|assword.|
|000008a0| 20 20 46 61 69 6c 75 72 | 65 20 74 6f 20 65 6e 74 | Failur|e to ent|
|000008b0| 65 72 0a 74 68 65 20 63 | 6f 72 72 65 63 74 20 70 |er.the c|orrect p|
|000008c0| 61 73 73 77 6f 72 64 20 | 72 65 73 75 6c 74 73 20 |assword |results |
|000008d0| 69 6e 20 74 68 65 20 69 | 6e 63 6f 72 72 65 63 74 |in the i|ncorrect|
|000008e0| 20 70 61 73 73 77 6f 72 | 64 20 61 6e 64 20 69 6e | passwor|d and in|
|000008f0| 66 6f 72 6d 61 74 69 6f | 6e 20 61 62 6f 75 74 0a |formatio|n about.|
|00000900| 74 68 65 20 61 62 6f 72 | 74 65 64 20 6c 6f 67 69 |the abor|ted logi|
|00000910| 6e 20 61 74 74 65 6d 70 | 74 20 74 6f 20 62 65 20 |n attemp|t to be |
|00000920| 6c 6f 67 67 65 64 20 69 | 6e 20 74 68 65 20 66 69 |logged i|n the fi|
|00000930| 6c 65 0a 58 2e 49 20 2e | 77 61 72 6e 69 6e 67 0a |le.X.I .|warning.|
|00000940| 77 68 69 63 68 20 69 73 | 20 63 72 65 61 74 65 64 |which is| created|
|00000950| 20 69 66 20 6e 65 63 65 | 73 73 61 72 79 2e 20 20 | if nece|ssary. |
|00000960| 49 66 20 73 75 63 63 65 | 73 73 66 75 6c 20 74 68 |If succe|ssful th|
|00000970| 65 20 73 68 65 6c 6c 20 | 63 68 65 63 6b 73 20 66 |e shell |checks f|
|00000980| 6f 72 20 74 68 65 0a 65 | 78 69 73 74 65 6e 63 65 |or the.e|xistence|
|00000990| 20 6f 66 20 74 68 65 0a | 58 2e 49 20 2e 77 61 72 | of the.|X.I .war|
|000009a0| 6e 69 6e 67 0a 66 69 6c | 65 20 61 6e 64 20 64 65 |ning.fil|e and de|
|000009b0| 74 65 72 6d 69 6e 65 73 | 20 68 6f 77 20 6d 61 6e |termines| how man|
|000009c0| 79 20 62 61 64 20 6c 6f | 67 69 6e 20 61 74 74 65 |y bad lo|gin atte|
|000009d0| 6d 70 74 73 20 68 61 76 | 65 20 62 65 65 6e 20 6d |mpts hav|e been m|
|000009e0| 61 64 65 20 61 6e 64 20 | 6e 6f 74 69 66 69 65 73 |ade and |notifies|
|000009f0| 0a 74 68 65 20 75 73 65 | 72 2e 20 20 4e 65 78 74 |.the use|r. Next|
|00000a00| 20 69 74 20 74 68 65 6e | 20 62 65 67 69 6e 73 20 | it then| begins |
|00000a10| 74 6f 20 72 65 61 64 20 | 63 6f 6d 6d 61 6e 64 73 |to read |commands|
|00000a20| 20 66 72 6f 6d 20 74 68 | 65 0a 58 2e 49 20 2e 6c | from th|e.X.I .l|
|00000a30| 6f 67 69 6e 0a 66 69 6c | 65 20 66 6f 75 6e 64 20 |ogin.fil|e found |
|00000a40| 69 6e 20 74 68 65 20 75 | 73 65 72 73 20 68 6f 6d |in the u|sers hom|
|00000a50| 65 20 64 69 72 65 63 74 | 6f 72 79 2c 20 74 68 65 |e direct|ory, the|
|00000a60| 6e 20 69 74 20 6c 6f 61 | 64 73 20 74 68 65 20 73 |n it loa|ds the s|
|00000a70| 61 76 65 64 20 68 69 73 | 74 6f 72 79 0a 66 72 6f |aved his|tory.fro|
|00000a80| 6d 20 74 68 65 0a 58 2e | 49 20 2e 68 69 73 74 0a |m the.X.|I .hist.|
|00000a90| 66 69 6c 65 20 61 6e 64 | 20 66 69 6e 61 6c 6c 79 |file and| finally|
|00000aa0| 20 72 65 61 64 73 20 63 | 6f 6d 6d 61 6e 64 73 20 | reads c|ommands |
|00000ab0| 66 72 6f 6d 20 74 68 65 | 0a 58 2e 49 20 2e 73 73 |from the|.X.I .ss|
|00000ac0| 68 72 63 0a 66 69 6c 65 | 2c 20 61 6c 73 6f 20 66 |hrc.file|, also f|
|00000ad0| 6f 75 6e 64 20 69 6e 20 | 74 68 65 20 75 73 65 72 |ound in |the user|
|00000ae0| 73 20 68 6f 6d 65 20 64 | 69 72 65 63 74 6f 72 79 |s home d|irectory|
|00000af0| 2e 0a 58 0a 49 66 20 69 | 74 20 69 73 20 74 68 65 |..X.If i|t is the|
|00000b00| 20 63 61 73 65 20 74 68 | 61 74 20 69 74 20 69 73 | case th|at it is|
|00000b10| 20 6e 6f 74 20 61 20 6c | 6f 67 69 6e 20 73 68 65 | not a l|ogin she|
|00000b20| 6c 6c 2c 20 0a 58 2e 49 | 20 73 73 68 0a 65 78 65 |ll, .X.I| ssh.exe|
|00000b30| 63 75 74 65 73 20 74 68 | 65 20 73 79 73 74 65 6d |cutes th|e system|
|00000b40| 20 6c 6f 67 69 6e 20 66 | 69 6c 65 0a 58 2e 49 20 | login f|ile.X.I |
|00000b50| 2f 65 74 63 2f 2e 73 73 | 68 72 63 0a 74 68 65 6e |/etc/.ss|hrc.then|
|00000b60| 20 65 78 65 63 75 74 65 | 73 20 74 68 65 0a 58 2e | execute|s the.X.|
|00000b70| 49 20 2e 73 73 68 72 63 | 0a 66 69 6c 65 20 66 6f |I .sshrc|.file fo|
|00000b80| 75 6e 64 20 69 6e 20 74 | 68 65 20 75 73 65 72 73 |und in t|he users|
|00000b90| 20 68 6f 6d 65 20 64 69 | 72 65 63 74 6f 72 79 2e | home di|rectory.|
|00000ba0| 20 20 54 68 65 0a 58 2e | 49 20 2e 73 73 68 72 63 | The.X.|I .sshrc|
|00000bb0| 0a 66 69 6c 65 20 69 6e | 20 74 68 65 20 75 73 65 |.file in| the use|
|00000bc0| 72 73 20 68 6f 6d 65 20 | 64 69 72 65 63 74 6f 72 |rs home |director|
|00000bd0| 79 20 6d 61 79 20 62 65 | 20 73 6b 69 70 70 65 64 |y may be| skipped|
|00000be0| 20 69 66 20 74 68 65 20 | 2d 66 20 63 6f 6d 6d 61 | if the |-f comma|
|00000bf0| 6e 64 20 6c 69 6e 65 0a | 6f 70 74 69 6f 6e 20 69 |nd line.|option i|
|00000c00| 73 20 70 61 73 73 65 64 | 20 61 73 20 61 6e 20 61 |s passed| as an a|
|00000c10| 72 67 75 6d 65 6e 74 20 | 74 6f 0a 58 2e 49 20 73 |rgument |to.X.I s|
|00000c20| 73 68 2e 0a 58 0a 41 66 | 74 65 72 20 73 75 63 63 |sh..X.Af|ter succ|
|00000c30| 65 73 73 66 75 6c 6c 79 | 20 6c 6f 67 67 69 6e 67 |essfully| logging|
|00000c40| 20 69 6e 2c 20 74 68 65 | 20 73 68 65 6c 6c 20 62 | in, the| shell b|
|00000c50| 65 67 69 6e 73 20 74 6f | 20 61 63 63 65 70 74 20 |egins to| accept |
|00000c60| 69 6e 70 75 74 20 66 72 | 6f 6d 20 74 68 65 0a 75 |input fr|om the.u|
|00000c70| 73 65 72 2c 20 70 72 6f | 6d 70 74 69 6e 67 20 77 |ser, pro|mpting w|
|00000c80| 69 74 68 20 61 20 60 3e | 27 20 28 6f 72 20 60 23 |ith a `>|' (or `#|
|00000c90| 27 20 69 66 20 74 68 65 | 20 75 73 65 72 20 69 73 |' if the| user is|
|00000ca0| 20 74 68 65 20 73 75 70 | 65 72 75 73 65 72 29 2c | the sup|eruser),|
|00000cb0| 20 75 6e 6c 65 73 73 0a | 74 68 65 20 70 72 6f 6d | unless.|the prom|
|00000cc0| 70 74 20 77 61 73 20 63 | 68 61 6e 67 65 64 20 62 |pt was c|hanged b|
|00000cd0| 79 20 74 68 65 20 75 73 | 65 72 20 69 6e 20 65 69 |y the us|er in ei|
|00000ce0| 74 68 65 72 20 74 68 65 | 69 72 0a 58 2e 49 20 2e |ther the|ir.X.I .|
|00000cf0| 6c 6f 67 69 6e 0a 6f 72 | 0a 58 2e 49 20 2e 73 73 |login.or|.X.I .ss|
|00000d00| 68 72 63 0a 66 69 6c 65 | 2e 0a 58 0a 54 68 65 20 |hrc.file|..X.The |
|00000d10| 73 68 65 6c 6c 20 74 68 | 65 6e 20 62 65 67 69 6e |shell th|en begin|
|00000d20| 73 20 74 6f 20 72 65 70 | 65 61 74 65 64 6c 79 20 |s to rep|eatedly |
|00000d30| 69 6e 70 75 74 20 6c 69 | 6e 65 73 20 6f 66 20 74 |input li|nes of t|
|00000d40| 65 78 74 20 66 72 6f 6d | 20 74 68 65 20 75 73 65 |ext from| the use|
|00000d50| 72 2e 0a 54 68 65 73 65 | 20 6c 69 6e 65 73 20 61 |r..These| lines a|
|00000d60| 72 65 20 70 6c 61 63 65 | 64 20 69 6e 20 74 68 65 |re place|d in the|
|00000d70| 20 73 68 65 6c 6c 73 20 | 68 69 73 74 6f 72 79 20 | shells |history |
|00000d80| 61 6e 64 20 74 68 65 6e | 20 62 72 6f 6b 65 6e 20 |and then| broken |
|00000d90| 75 70 20 69 6e 74 6f 20 | 77 6f 72 64 73 2c 0a 77 |up into |words,.w|
|00000da0| 68 69 63 68 20 61 72 65 | 20 70 61 72 73 65 64 20 |hich are| parsed |
|00000db0| 65 61 63 68 20 69 6e 20 | 74 75 72 6e 20 66 6f 72 |each in |turn for|
|00000dc0| 20 61 6c 69 61 73 65 73 | 2c 20 76 61 72 69 61 62 | aliases|, variab|
|00000dd0| 6c 65 73 2c 20 6c 6f 67 | 69 63 61 6c 20 61 73 73 |les, log|ical ass|
|00000de0| 69 67 6e 6d 65 6e 74 73 | 2c 0a 61 6e 64 20 77 69 |ignments|,.and wi|
|00000df0| 6c 64 63 61 72 64 73 2e | 20 20 46 69 6e 61 6c 6c |ldcards.| Finall|
|00000e00| 79 20 74 68 65 20 77 6f | 72 64 73 20 61 72 65 20 |y the wo|rds are |
|00000e10| 70 61 73 73 65 64 20 74 | 6f 20 74 68 65 20 65 78 |passed t|o the ex|
|00000e20| 65 63 75 74 6f 72 20 77 | 68 65 72 65 20 69 74 20 |ecutor w|here it |
|00000e30| 70 61 72 73 65 73 0a 66 | 6f 72 20 72 65 64 69 72 |parses.f|or redir|
|00000e40| 65 63 74 69 6f 6e 73 20 | 61 6e 64 20 70 69 70 65 |ections |and pipe|
|00000e50| 73 20 61 6e 64 20 74 68 | 65 6e 20 66 69 6e 61 6c |s and th|en final|
|00000e60| 6c 79 20 65 78 65 63 75 | 74 65 73 20 74 68 65 20 |ly execu|tes the |
|00000e70| 63 6f 6d 6d 61 6e 64 2e | 0a 58 0a 58 46 69 6e 61 |command.|.X.XFina|
|00000e80| 6c 6c 79 2c 20 77 68 65 | 6e 20 74 68 65 20 73 68 |lly, whe|n the sh|
|00000e90| 65 6c 6c 20 74 65 72 6d | 69 6e 61 74 65 73 2c 20 |ell term|inates, |
|00000ea0| 69 74 20 72 65 61 64 73 | 20 63 6f 6d 6d 61 6e 64 |it reads| command|
|00000eb0| 73 20 6f 75 74 20 6f 66 | 20 74 68 65 0a 58 2e 49 |s out of| the.X.I|
|00000ec0| 20 2e 6c 6f 67 6f 75 74 | 0a 66 69 6c 65 20 6c 6f | .logout|.file lo|
|00000ed0| 63 61 74 65 64 20 69 6e | 20 74 68 65 20 75 73 65 |cated in| the use|
|00000ee0| 72 73 20 68 6f 6d 65 20 | 64 69 72 65 63 74 6f 72 |rs home |director|
|00000ef0| 79 2e 20 20 55 70 6f 6e | 20 65 78 65 63 75 74 69 |y. Upon| executi|
|00000f00| 6e 67 20 61 6c 6c 20 74 | 68 65 20 6c 6f 67 6f 75 |ng all t|he logou|
|00000f10| 74 0a 63 6f 6d 6d 61 6e | 64 73 20 74 68 65 20 73 |t.comman|ds the s|
|00000f20| 68 65 6c 6c 20 65 78 69 | 74 73 2e 0a 58 0a 58 2e |hell exi|ts..X.X.|
|00000f30| 53 48 20 4c 45 58 49 43 | 41 4c 20 53 54 52 55 43 |SH LEXIC|AL STRUC|
|00000f40| 54 55 52 45 0a 58 0a 54 | 68 65 20 73 68 65 6c 6c |TURE.X.T|he shell|
|00000f50| 20 73 70 6c 69 74 73 20 | 69 6e 70 75 74 20 6c 69 | splits |input li|
|00000f60| 6e 65 73 20 69 6e 74 6f | 20 77 6f 72 64 73 20 61 |nes into| words a|
|00000f70| 74 20 73 70 61 63 65 73 | 20 61 6e 64 20 74 61 62 |t spaces| and tab|
|00000f80| 73 20 77 69 74 68 20 74 | 68 65 0a 66 6f 6c 6c 6f |s with t|he.follo|
|00000f90| 77 69 6e 67 20 65 78 63 | 65 70 74 69 6f 6e 73 2e |wing exc|eptions.|
|00000fa0| 20 54 68 65 20 63 68 61 | 72 61 63 74 65 72 73 20 | The cha|racters |
|00000fb0| 60 3b 27 2c 20 60 26 27 | 2c 20 60 7c 27 2c 20 60 |`;', `&'|, `|', `|
|00000fc0| 3c 27 2c 20 60 3e 27 2c | 20 60 28 27 2c 20 60 29 |<', `>',| `(', `)|
|00000fd0| 27 0a 61 73 20 77 65 6c | 6c 20 61 73 20 74 68 65 |'.as wel|l as the|
|00000fe0| 20 6d 65 74 61 63 68 61 | 72 61 63 74 65 72 73 20 | metacha|racters |
|00000ff0| 60 26 26 27 2c 20 60 26 | 21 27 2c 20 60 26 3d 27 |`&&', `&|!', `&='|
|00001000| 2c 20 60 7c 7c 27 2c 20 | 60 7c 21 27 2c 20 60 7c |, `||', |`|!', `||
|00001010| 26 27 2c 20 60 7c 3d 27 | 2c 0a 58 60 3e 3e 27 2c |&', `|='|,.X`>>',|
|00001020| 20 60 3e 21 27 2c 20 60 | 3e 3e 21 27 2c 20 60 3e | `>!', `|>>!', `>|
|00001030| 26 27 2c 20 60 3e 3e 26 | 27 2c 20 60 3e 3d 27 2c |&', `>>&|', `>=',|
|00001040| 20 60 3e 3e 3d 27 2c 20 | 60 3c 3c 27 2c 20 60 3c | `>>=', |`<<', `<|
|00001050| 3c 3d 27 2c 20 60 24 3c | 27 2c 20 60 21 3d 27 2c |<=', `$<|', `!=',|
|00001060| 0a 58 60 3c 25 27 20 60 | 3c 3c 25 27 2c 20 60 3e |.X`<%' `|<<%', `>|
|00001070| 25 27 2c 20 60 3e 21 25 | 27 2c 20 60 3e 26 25 27 |%', `>!%|', `>&%'|
|00001080| 2c 20 60 3e 3e 25 27 2c | 20 60 3e 3e 21 25 27 2c |, `>>%',| `>>!%',|
|00001090| 20 60 3e 3e 26 25 27 20 | 66 6f 72 6d 20 73 69 6e | `>>&%' |form sin|
|000010a0| 67 6c 65 20 77 6f 72 64 | 73 2e 0a 54 68 65 73 65 |gle word|s..These|
|000010b0| 20 70 61 72 73 65 72 20 | 6d 65 74 61 63 68 61 72 | parser |metachar|
|000010c0| 61 63 74 65 72 73 20 6d | 61 79 20 62 65 20 6d 61 |acters m|ay be ma|
|000010d0| 64 65 20 70 61 72 74 20 | 6f 66 20 6f 66 20 6f 74 |de part |of of ot|
|000010e0| 68 65 72 20 77 6f 72 64 | 73 20 62 79 20 65 73 63 |her word|s by esc|
|000010f0| 61 70 69 6e 67 0a 74 68 | 65 6d 20 77 69 74 68 20 |aping.th|em with |
|00001100| 62 61 63 6b 73 6c 61 73 | 68 73 20 60 5c 5c 27 2e |backslas|hs `\\'.|
|00001110| 0a 58 0a 49 6e 20 61 64 | 64 69 74 69 6f 6e 73 2c |.X.In ad|ditions,|
|00001120| 20 73 74 72 69 6e 67 73 | 20 65 6e 63 6c 6f 73 65 | strings| enclose|
|00001130| 64 20 69 6e 20 60 27 27 | 2c 20 27 60 27 2c 20 6f |d in `''|, '`', o|
|00001140| 72 20 27 22 27 2c 20 66 | 6f 72 6d 20 61 20 77 68 |r '"', f|orm a wh|
|00001150| 6f 6c 65 20 77 6f 72 64 | 2e 0a 43 68 61 72 61 63 |ole word|..Charac|
|00001160| 74 65 72 73 20 65 6e 63 | 6c 6f 73 65 64 20 69 6e |ters enc|losed in|
|00001170| 20 74 68 65 73 65 20 73 | 74 72 69 6e 67 73 2c 20 | these s|trings, |
|00001180| 73 61 76 65 20 6e 65 77 | 6c 69 6e 65 20 61 6e 64 |save new|line and|
|00001190| 20 74 68 65 20 60 5c 5c | 27 20 61 72 65 20 6e 6f | the `\\|' are no|
|000011a0| 74 0a 70 61 72 73 65 64 | 20 66 6f 72 20 61 6e 79 |t.parsed| for any|
|000011b0| 20 6f 74 68 65 72 20 73 | 70 65 63 69 61 6c 20 6d | other s|pecial m|
|000011c0| 65 61 6e 69 6e 67 20 65 | 78 63 65 70 74 20 69 6e |eaning e|xcept in|
|000011d0| 73 69 64 65 20 6f 66 20 | 64 6f 75 62 6c 65 20 71 |side of |double q|
|000011e0| 75 6f 74 65 64 20 73 74 | 72 69 6e 67 73 0a 77 68 |uoted st|rings.wh|
|000011f0| 65 72 65 20 76 61 72 69 | 61 62 6c 65 20 65 78 70 |ere vari|able exp|
|00001200| 61 6e 73 69 6f 6e 20 6d | 61 79 20 74 61 6b 65 20 |ansion m|ay take |
|00001210| 70 6c 61 63 65 2e 20 20 | 54 68 65 20 60 5c 5c 27 |place. |The `\\'|
|00001220| 20 66 6f 6c 6c 6f 77 65 | 64 20 62 79 20 6f 6e 65 | followe|d by one|
|00001230| 20 6f 66 20 74 68 65 0a | 66 6f 6c 6c 6f 77 69 6e | of the.|followin|
|00001240| 67 20 63 68 61 72 61 63 | 74 65 72 73 20 69 73 20 |g charac|ters is |
|00001250| 72 65 70 6c 61 63 65 64 | 20 62 79 20 61 20 6e 6f |replaced| by a no|
|00001260| 6e 2d 70 72 69 6e 74 69 | 6e 67 20 63 68 61 72 61 |n-printi|ng chara|
|00001270| 63 74 65 72 3a 0a 58 0a | 58 2e 62 72 0a 58 09 5c |cter:.X.|X.br.X.\|
|00001280| 5c 61 20 20 20 20 20 42 | 65 6c 6c 20 20 20 20 20 |\a B|ell |
|00001290| 20 20 20 20 20 20 20 28 | 41 73 63 69 69 20 20 37 | (|Ascii 7|
|000012a0| 29 0a 58 2e 62 72 0a 58 | 09 5c 5c 62 20 20 20 20 |).X.br.X|.\\b |
|000012b0| 20 42 61 63 6b 73 70 61 | 63 65 20 20 20 20 20 20 | Backspa|ce |
|000012c0| 20 28 41 73 63 69 69 20 | 20 38 29 0a 58 2e 62 72 | (Ascii | 8).X.br|
|000012d0| 0a 58 09 5c 5c 74 20 20 | 20 20 20 54 61 62 20 20 |.X.\\t | Tab |
|000012e0| 20 20 20 20 20 20 20 20 | 20 20 20 28 41 73 63 69 | | (Asci|
|000012f0| 69 20 20 39 29 0a 58 2e | 62 72 0a 58 09 5c 5c 6e |i 9).X.|br.X.\\n|
|00001300| 20 20 20 20 20 4e 65 77 | 6c 69 6e 65 20 20 20 20 | New|line |
|00001310| 20 20 20 20 20 28 41 73 | 63 69 69 20 31 30 29 0a | (As|cii 10).|
|00001320| 58 2e 62 72 0a 58 09 5c | 5c 66 20 20 20 20 20 46 |X.br.X.\|\f F|
|00001330| 6f 72 6d 20 46 65 65 64 | 20 20 20 20 20 20 20 28 |orm Feed| (|
|00001340| 41 73 63 69 69 20 31 31 | 29 0a 58 2e 62 72 0a 58 |Ascii 11|).X.br.X|
|00001350| 09 5c 5c 72 20 20 20 20 | 20 43 61 72 72 69 61 67 |.\\r | Carriag|
|00001360| 65 20 72 65 74 75 72 6e | 20 28 41 73 63 69 69 20 |e return| (Ascii |
|00001370| 31 33 29 0a 58 2e 62 72 | 0a 58 09 5c 5c 65 20 20 |13).X.br|.X.\\e |
|00001380| 20 20 20 45 73 63 61 70 | 65 20 20 20 20 20 20 20 | Escap|e |
|00001390| 20 20 20 28 41 73 63 69 | 69 20 32 37 29 0a 58 2e | (Asci|i 27).X.|
|000013a0| 62 72 0a 58 09 5c 5c 30 | 78 78 78 20 20 4f 63 74 |br.X.\\0|xxx Oct|
|000013b0| 61 6c 20 65 73 63 61 70 | 65 0a 58 2e 62 72 0a 58 |al escap|e.X.br.X|
|000013c0| 0a 58 60 5c 5c 27 20 6d | 61 79 20 61 6c 73 6f 20 |.X`\\' m|ay also |
|000013d0| 62 65 20 75 73 65 64 20 | 74 6f 20 65 73 63 61 70 |be used |to escap|
|000013e0| 65 20 74 68 65 20 73 74 | 72 69 6e 67 20 71 75 6f |e the st|ring quo|
|000013f0| 74 65 20 69 74 73 65 6c | 66 20 61 73 20 77 65 6c |te itsel|f as wel|
|00001400| 6c 20 61 6e 64 20 69 6e | 0a 64 6f 75 62 6c 65 2d |l and in|.double-|
|00001410| 71 75 6f 74 65 64 20 73 | 74 72 69 6e 67 73 20 74 |quoted s|trings t|
|00001420| 6f 20 65 73 63 61 70 65 | 20 74 68 65 20 73 70 65 |o escape| the spe|
|00001430| 63 69 61 6c 20 6d 65 61 | 6e 69 6e 67 20 6f 66 20 |cial mea|ning of |
|00001440| 74 68 65 20 60 24 27 20 | 73 79 6d 62 6f 6c 2e 0a |the `$' |symbol..|
|00001450| 58 0a 57 6f 72 64 73 20 | 70 6c 61 63 65 64 20 69 |X.Words |placed i|
|00001460| 6e 73 69 64 65 20 6f 66 | 20 60 28 27 20 61 6e 64 |nside of| `(' and|
|00001470| 20 60 29 27 20 6c 6f 73 | 65 20 74 68 65 69 72 20 | `)' los|e their |
|00001480| 73 70 65 63 69 61 6c 20 | 6d 65 61 6e 69 6e 67 20 |special |meaning |
|00001490| 74 6f 20 74 68 65 0a 73 | 68 65 6c 6c 2e 20 20 54 |to the.s|hell. T|
|000014a0| 68 69 73 20 69 6e 63 6c | 75 64 65 73 20 61 6c 6c |his incl|udes all|
|000014b0| 20 72 65 64 69 72 65 63 | 74 69 6f 6e 2c 20 70 69 | redirec|tion, pi|
|000014c0| 70 69 6e 67 2c 20 62 61 | 63 6b 67 72 6f 75 6e 64 |ping, ba|ckground|
|000014d0| 2c 20 76 61 72 69 61 62 | 6c 65 0a 69 64 65 6e 74 |, variab|le.ident|
|000014e0| 69 66 69 65 72 73 2c 20 | 6c 6f 67 69 63 61 6c 20 |ifiers, |logical |
|000014f0| 61 73 73 69 67 6e 6d 65 | 6e 74 73 2c 20 61 6e 64 |assignme|nts, and|
|00001500| 20 61 6c 6c 20 6f 74 68 | 65 72 20 73 70 65 63 69 | all oth|er speci|
|00001510| 61 6c 20 73 79 6d 62 6f | 6c 73 2e 0a 58 0a 58 46 |al symbo|ls..X.XF|
|00001520| 69 6e 61 6c 6c 79 2c 20 | 74 68 65 20 60 23 27 20 |inally, |the `#' |
|00001530| 61 74 20 74 68 65 20 73 | 74 61 72 74 20 6f 66 20 |at the s|tart of |
|00001540| 61 20 77 6f 72 64 20 73 | 74 61 72 74 73 20 61 20 |a word s|tarts a |
|00001550| 63 6f 6d 6d 65 6e 74 2c | 20 77 68 65 72 65 20 65 |comment,| where e|
|00001560| 76 65 72 79 74 68 69 6e | 67 0a 66 6f 6c 6c 6f 77 |verythin|g.follow|
|00001570| 69 6e 67 20 74 68 65 20 | 60 23 27 20 69 73 20 69 |ing the |`#' is i|
|00001580| 67 6e 6f 72 65 64 20 62 | 79 20 74 68 65 20 73 68 |gnored b|y the sh|
|00001590| 65 6c 6c 2e 20 49 66 20 | 70 72 65 63 65 64 65 64 |ell. If |preceded|
|000015a0| 20 62 79 20 61 20 60 5c | 5c 27 20 6f 72 20 65 6e | by a `\|\' or en|
|000015b0| 63 6c 6f 73 65 64 0a 69 | 6e 20 61 20 73 74 72 69 |closed.i|n a stri|
|000015c0| 6e 67 20 69 74 20 69 73 | 20 70 72 65 76 65 6e 74 |ng it is| prevent|
|000015d0| 65 64 20 69 74 27 73 20 | 73 70 65 63 69 61 6c 20 |ed it's |special |
|000015e0| 6d 65 61 6e 69 6e 67 2e | 0a 58 0a 58 2e 53 48 20 |meaning.|.X.X.SH |
|000015f0| 43 4f 4d 4d 41 4e 44 53 | 0a 58 0a 53 69 6d 70 6c |COMMANDS|.X.Simpl|
|00001600| 65 20 63 6f 6d 6d 61 6e | 64 73 20 61 72 65 20 63 |e comman|ds are c|
|00001610| 6f 6d 70 6f 73 65 64 20 | 6f 66 20 61 20 73 65 71 |omposed |of a seq|
|00001620| 75 65 6e 63 65 20 6f 66 | 20 77 6f 72 64 73 2c 20 |uence of| words, |
|00001630| 74 68 65 20 66 69 72 73 | 74 20 6f 66 20 77 68 69 |the firs|t of whi|
|00001640| 63 68 0a 69 73 20 74 68 | 65 20 63 6f 6d 6d 61 6e |ch.is th|e comman|
|00001650| 64 20 74 6f 20 62 65 20 | 65 78 65 63 75 74 65 64 |d to be |executed|
|00001660| 2e 20 20 41 20 70 69 70 | 65 6c 69 6e 65 20 69 73 |. A pip|eline is|
|00001670| 20 74 77 6f 20 6f 72 20 | 6d 6f 72 65 20 73 69 6d | two or |more sim|
|00001680| 70 6c 65 20 63 6f 6d 6d | 61 6e 64 73 0a 73 65 70 |ple comm|ands.sep|
|00001690| 61 72 61 74 65 64 20 62 | 79 20 60 7c 27 2c 20 60 |arated b|y `|', `|
|000016a0| 7c 21 27 20 6f 72 20 60 | 7c 26 27 20 6d 65 74 61 ||!' or `||&' meta|
|000016b0| 63 68 61 72 61 63 74 65 | 72 73 20 74 6f 20 66 6f |characte|rs to fo|
|000016c0| 72 6d 20 61 20 63 6f 6d | 70 6c 65 78 20 63 6f 6d |rm a com|plex com|
|000016d0| 6d 61 6e 64 2e 0a 49 6e | 20 70 69 70 65 6c 69 6e |mand..In| pipelin|
|000016e0| 65 73 2c 20 74 68 65 20 | 6f 75 74 70 75 74 20 6f |es, the |output o|
|000016f0| 66 20 74 68 65 20 66 69 | 72 73 74 20 63 6f 6d 6d |f the fi|rst comm|
|00001700| 61 6e 64 20 69 73 20 72 | 65 64 69 72 65 63 74 65 |and is r|edirecte|
|00001710| 64 20 69 6e 74 6f 20 74 | 68 65 20 69 6e 70 75 74 |d into t|he input|
|00001720| 0a 6f 66 20 74 68 65 20 | 6e 65 78 74 20 63 6f 6d |.of the |next com|
|00001730| 6d 61 6e 64 20 61 6e 64 | 20 73 6f 20 6f 6e 2e 20 |mand and| so on. |
|00001740| 53 69 6d 70 6c 65 20 63 | 6f 6d 6d 61 6e 64 73 20 |Simple c|ommands |
|00001750| 6f 72 20 63 6f 6d 70 6c | 65 78 20 63 6f 6d 6d 61 |or compl|ex comma|
|00001760| 6e 64 73 20 6d 61 79 20 | 62 65 0a 73 65 70 61 72 |nds may |be.separ|
|00001770| 61 74 65 64 20 62 79 20 | 60 3b 27 20 74 6f 20 65 |ated by |`;' to e|
|00001780| 78 65 63 75 74 65 20 74 | 68 65 6d 20 65 61 63 68 |xecute t|hem each|
|00001790| 20 69 6e 20 73 75 63 63 | 65 73 73 69 6f 6e 2e 0a | in succ|ession..|
|000017a0| 58 0a 43 6f 6d 6d 61 6e | 64 73 20 6d 61 79 20 61 |X.Comman|ds may a|
|000017b0| 6c 73 6f 20 62 65 20 73 | 65 70 61 72 61 74 65 64 |lso be s|eparated|
|000017c0| 20 62 79 20 74 68 65 20 | 6d 65 74 61 63 68 61 72 | by the |metachar|
|000017d0| 61 63 74 65 72 73 20 60 | 26 26 27 20 69 6e 64 69 |acters `|&&' indi|
|000017e0| 63 61 74 65 20 74 6f 20 | 74 68 65 0a 73 68 65 6c |cate to |the.shel|
|000017f0| 6c 20 74 68 61 74 20 69 | 66 20 74 68 65 20 70 72 |l that i|f the pr|
|00001800| 65 76 69 6f 75 73 20 63 | 6f 6d 6d 61 6e 64 20 65 |evious c|ommand e|
|00001810| 78 65 63 75 74 65 64 20 | 63 6f 72 72 65 63 74 6c |xecuted |correctl|
|00001820| 79 2c 20 74 68 65 6e 20 | 74 68 65 20 73 65 63 6f |y, then |the seco|
|00001830| 6e 64 0a 63 6f 6d 6d 61 | 6e 64 20 69 73 20 61 6c |nd.comma|nd is al|
|00001840| 73 6f 20 65 78 65 63 75 | 74 65 64 2c 20 6f 74 68 |so execu|ted, oth|
|00001850| 65 72 77 69 73 65 20 69 | 74 20 69 73 20 6e 6f 74 |erwise i|t is not|
|00001860| 2e 20 20 43 6f 6d 6d 61 | 6e 64 73 20 73 65 70 61 |. Comma|nds sepa|
|00001870| 72 61 74 65 64 20 62 79 | 20 60 7c 7c 27 0a 69 6e |rated by| `||'.in|
|00001880| 64 69 63 61 74 65 20 74 | 68 61 74 20 69 66 20 74 |dicate t|hat if t|
|00001890| 68 65 20 70 72 65 76 69 | 6f 75 73 20 63 6f 6d 6d |he previ|ous comm|
|000018a0| 61 6e 64 20 65 78 65 63 | 75 74 65 64 20 63 6f 72 |and exec|uted cor|
|000018b0| 72 65 63 74 6c 79 2c 20 | 74 68 65 6e 20 74 68 65 |rectly, |then the|
|000018c0| 20 73 65 63 6f 6e 64 0a | 63 6f 6d 6d 61 6e 64 20 | second.|command |
|000018d0| 69 73 20 6e 6f 74 20 65 | 78 65 63 75 74 65 64 2c |is not e|xecuted,|
|000018e0| 20 6f 74 68 65 72 77 69 | 73 65 20 69 74 20 69 73 | otherwi|se it is|
|000018f0| 2e 0a 58 0a 43 6f 6d 6d | 61 6e 64 73 20 6d 61 79 |..X.Comm|ands may|
|00001900| 20 61 6c 73 6f 20 62 65 | 20 74 65 72 6d 69 6e 61 | also be| termina|
|00001910| 74 65 64 20 6f 72 20 73 | 65 70 61 72 61 74 65 64 |ted or s|eparated|
|00001920| 20 62 79 20 60 26 27 6f | 72 20 60 26 21 27 20 74 | by `&'o|r `&!' t|
|00001930| 6f 20 70 72 65 76 65 6e | 74 20 74 68 65 0a 73 68 |o preven|t the.sh|
|00001940| 65 6c 6c 20 66 72 6f 6d | 20 77 61 69 74 69 6e 67 |ell from| waiting|
|00001950| 20 66 6f 72 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 | for the| command|
|00001960| 20 74 6f 20 74 65 72 6d | 69 6e 61 74 65 2e 20 43 | to term|inate. C|
|00001970| 6f 6d 6d 61 6e 64 73 20 | 73 75 62 6d 69 74 74 65 |ommands |submitte|
|00001980| 64 20 69 6e 20 74 68 69 | 73 0a 66 61 73 68 69 6f |d in thi|s.fashio|
|00001990| 6e 20 61 72 65 20 73 61 | 69 64 20 74 6f 20 62 65 |n are sa|id to be|
|000019a0| 20 69 6e 20 74 68 65 0a | 58 2e 49 20 62 61 63 6b | in the.|X.I back|
|000019b0| 67 72 6f 75 6e 64 0a 58 | 2c 20 61 73 20 6f 70 70 |ground.X|, as opp|
|000019c0| 6f 73 65 64 20 74 6f 0a | 58 2e 49 20 66 6f 72 65 |osed to.|X.I fore|
|000019d0| 67 72 6f 75 6e 64 0a 6a | 6f 62 73 20 77 68 69 63 |ground.j|obs whic|
|000019e0| 68 20 61 72 65 20 77 61 | 69 74 65 64 20 6f 6e 20 |h are wa|ited on |
|000019f0| 74 6f 20 63 6f 6d 70 6c | 65 74 65 20 61 6e 64 20 |to compl|ete and |
|00001a00| 68 61 76 65 20 63 6f 6e | 74 72 6f 6c 20 6f 66 20 |have con|trol of |
|00001a10| 74 68 65 20 74 65 72 6d | 69 6e 61 6c 2e 0a 58 0a |the term|inal..X.|
|00001a20| 58 2e 53 48 20 4a 4f 42 | 53 0a 58 0a 54 68 65 20 |X.SH JOB|S.X.The |
|00001a30| 73 68 65 6c 6c 20 6b 65 | 65 70 73 20 61 20 74 61 |shell ke|eps a ta|
|00001a40| 62 6c 65 20 6f 66 20 61 | 6c 6c 20 6a 6f 62 73 20 |ble of a|ll jobs |
|00001a50| 74 68 61 74 20 61 72 65 | 20 63 75 72 72 65 6e 74 |that are| current|
|00001a60| 6c 79 20 72 75 6e 6e 69 | 6e 67 20 6f 72 20 73 74 |ly runni|ng or st|
|00001a70| 6f 70 70 65 64 0a 74 68 | 61 74 20 74 68 65 20 75 |opped.th|at the u|
|00001a80| 73 65 72 20 68 61 73 20 | 65 78 65 63 75 74 65 64 |ser has |executed|
|00001a90| 2e 20 20 54 68 69 73 20 | 74 61 62 6c 65 20 69 73 |. This |table is|
|00001aa0| 20 70 72 69 6e 74 65 64 | 20 62 79 20 75 73 65 20 | printed| by use |
|00001ab0| 6f 66 20 74 68 65 20 62 | 75 69 6c 74 69 6e 0a 63 |of the b|uiltin.c|
|00001ac0| 6f 6d 6d 61 6e 64 0a 58 | 2e 49 20 6a 6f 62 73 2e |ommand.X|.I jobs.|
|00001ad0| 0a 58 45 61 63 68 20 65 | 6e 74 72 79 20 68 61 73 |.XEach e|ntry has|
|00001ae0| 20 74 68 65 20 66 6f 72 | 6d 3a 0a 58 0a 58 2e 62 | the for|m:.X.X.b|
|00001af0| 72 0a 58 5b 3c 5c 66 49 | 6a 6f 62 20 6e 75 6d 62 |r.X[<\fI|job numb|
|00001b00| 65 72 5c 66 50 3e 5d 20 | 28 3c 5c 66 49 50 49 44 |er\fP>] |(<\fIPID|
|00001b10| 5c 66 50 3e 29 20 3c 5c | 66 49 73 74 61 74 75 73 |\fP>) <\|fIstatus|
|00001b20| 5c 66 50 3e 09 09 3c 5c | 66 49 6a 6f 62 20 6e 61 |\fP>..<\|fIjob na|
|00001b30| 6d 65 5c 66 50 3e 0a 58 | 0a 77 68 65 72 65 20 3c |me\fP>.X|.where <|
|00001b40| 5c 66 49 6a 6f 62 20 6e | 75 6d 62 65 72 5c 66 50 |\fIjob n|umber\fP|
|00001b50| 3e 20 69 73 20 74 68 65 | 20 6c 6f 67 69 63 61 6c |> is the| logical|
|00001b60| 20 6e 75 6d 62 65 72 20 | 74 68 65 20 73 68 65 6c | number |the shel|
|00001b70| 6c 20 61 73 73 69 67 6e | 73 20 74 6f 20 74 68 65 |l assign|s to the|
|00001b80| 20 6a 6f 62 2e 0a 54 68 | 65 20 6a 6f 62 20 69 73 | job..Th|e job is|
|00001b90| 20 72 65 66 65 72 65 6e | 63 65 64 20 62 79 20 74 | referen|ced by t|
|00001ba0| 68 69 73 20 6e 75 6d 62 | 65 72 20 66 6f 72 20 74 |his numb|er for t|
|00001bb0| 68 65 20 70 72 6f 63 65 | 73 73 20 63 6f 6e 74 72 |he proce|ss contr|
|00001bc0| 6f 6c 20 63 6f 6d 6d 61 | 6e 64 73 0a 58 2e 49 20 |ol comma|nds.X.I |
|00001bd0| 62 67 2c 20 66 67 0a 61 | 6e 64 0a 58 2e 49 20 73 |bg, fg.a|nd.X.I s|
|00001be0| 74 6f 70 2e 0a 54 68 65 | 20 3c 5c 66 49 50 49 44 |top..The| <\fIPID|
|00001bf0| 5c 66 50 3e 20 69 73 20 | 74 68 65 20 73 79 73 74 |\fP> is |the syst|
|00001c00| 65 6d 20 70 72 6f 63 65 | 73 73 20 49 44 20 6f 66 |em proce|ss ID of|
|00001c10| 20 74 68 65 20 6a 6f 62 | 2e 20 3c 5c 66 49 53 74 | the job|. <\fISt|
|00001c20| 61 74 75 73 5c 66 50 3e | 20 69 73 20 74 68 65 0a |atus\fP>| is the.|
|00001c30| 73 74 61 74 75 73 20 6f | 66 20 74 68 65 20 6a 6f |status o|f the jo|
|00001c40| 62 2c 20 77 68 69 63 68 | 20 69 6e 64 69 63 61 74 |b, which| indicat|
|00001c50| 65 73 20 77 68 65 74 68 | 65 72 20 74 68 65 20 6a |es wheth|er the j|
|00001c60| 6f 62 20 69 73 20 72 75 | 6e 6e 69 6e 67 20 6f 72 |ob is ru|nning or|
|00001c70| 20 73 74 6f 70 70 65 64 | 0a 61 6e 64 20 69 66 20 | stopped|.and if |
|00001c80| 69 74 20 69 73 20 69 6e | 20 74 68 65 20 62 61 63 |it is in| the bac|
|00001c90| 6b 67 72 6f 75 6e 64 20 | 6f 72 20 66 6f 72 65 67 |kground |or foreg|
|00001ca0| 72 6f 75 6e 64 2e 20 20 | 54 68 65 20 3c 5c 66 49 |round. |The <\fI|
|00001cb0| 6a 6f 62 20 6e 61 6d 65 | 5c 66 50 3e 20 69 73 20 |job name|\fP> is |
|00001cc0| 74 68 65 0a 63 6f 6d 6d | 61 6e 64 20 77 6f 72 64 |the.comm|and word|
|00001cd0| 20 28 66 69 72 73 74 20 | 77 6f 72 64 29 20 6f 66 | (first |word) of|
|00001ce0| 20 74 68 65 20 6a 6f 62 | 20 73 74 61 72 74 65 64 | the job| started|
|00001cf0| 2e 0a 58 0a 54 79 70 69 | 6e 67 20 5e 5a 20 28 63 |..X.Typi|ng ^Z (c|
|00001d00| 6f 6e 74 72 6f 6c 2d 5a | 29 20 77 68 69 6c 65 20 |ontrol-Z|) while |
|00001d10| 72 75 6e 6e 69 6e 67 20 | 61 20 66 6f 72 65 67 72 |running |a foregr|
|00001d20| 6f 75 6e 64 20 70 72 6f | 63 65 73 73 20 75 73 75 |ound pro|cess usu|
|00001d30| 61 6c 6c 79 20 73 65 6e | 64 73 20 74 68 65 0a 73 |ally sen|ds the.s|
|00001d40| 74 6f 70 20 73 69 67 6e | 61 6c 20 74 6f 20 74 68 |top sign|al to th|
|00001d50| 61 74 20 70 72 6f 63 65 | 73 73 65 73 2e 20 20 57 |at proce|sses. W|
|00001d60| 68 65 6e 20 74 68 69 73 | 20 68 61 70 70 65 6e 73 |hen this| happens|
|00001d70| 20 74 68 65 20 70 72 6f | 63 65 73 73 20 69 73 20 | the pro|cess is |
|00001d80| 73 74 6f 70 70 65 64 20 | 61 6e 64 0a 74 68 65 20 |stopped |and.the |
|00001d90| 73 68 65 6c 6c 20 69 6e | 64 69 63 61 74 65 73 20 |shell in|dicates |
|00001da0| 74 68 61 74 20 74 68 65 | 20 6a 6f 62 20 69 73 20 |that the| job is |
|00001db0| 73 74 6f 70 70 65 64 20 | 61 6e 64 20 72 65 74 75 |stopped |and retu|
|00001dc0| 72 6e 20 74 68 65 20 75 | 73 65 72 20 74 6f 20 74 |rn the u|ser to t|
|00001dd0| 68 65 0a 63 6f 6d 6d 61 | 6e 64 20 6c 69 6e 65 20 |he.comma|nd line |
|00001de0| 77 68 65 72 65 20 74 68 | 65 79 20 6d 61 79 20 72 |where th|ey may r|
|00001df0| 75 6e 20 6f 74 68 65 72 | 20 63 6f 6d 6d 61 6e 64 |un other| command|
|00001e00| 73 20 6f 72 20 6d 61 6e | 69 70 75 6c 61 74 65 20 |s or man|ipulate |
|00001e10| 6f 74 68 65 72 20 6a 6f | 62 73 2e 0a 53 74 6f 70 |other jo|bs..Stop|
|00001e20| 70 65 64 20 6a 6f 62 73 | 20 6d 61 79 20 62 65 20 |ped jobs| may be |
|00001e30| 6d 61 6e 69 70 75 6c 61 | 74 65 64 20 77 69 74 68 |manipula|ted with|
|00001e40| 20 74 68 65 0a 58 2e 49 | 20 66 67 2c 20 62 67 0a | the.X.I| fg, bg.|
|00001e50| 61 6e 64 0a 58 2e 49 20 | 73 74 6f 70 0a 63 6f 6d |and.X.I |stop.com|
|00001e60| 6d 61 6e 64 73 20 74 6f | 20 70 6c 61 63 65 20 74 |mands to| place t|
|00001e70| 68 65 6d 20 69 6e 20 74 | 68 65 20 66 6f 72 65 67 |hem in t|he foreg|
|00001e80| 72 6f 75 6e 64 20 6f 72 | 20 62 61 63 6b 67 72 6f |round or| backgro|
|00001e90| 75 6e 64 2e 0a 58 0a 41 | 20 6a 6f 62 20 6d 61 64 |und..X.A| job mad|
|00001ea0| 65 20 74 6f 20 72 75 6e | 20 69 6e 20 74 68 65 20 |e to run| in the |
|00001eb0| 62 61 63 6b 67 72 6f 75 | 6e 64 20 77 69 74 68 20 |backgrou|nd with |
|00001ec0| 74 68 65 20 60 26 27 20 | 6f 72 20 60 26 21 27 20 |the `&' |or `&!' |
|00001ed0| 6d 65 74 61 63 68 61 72 | 61 63 74 65 72 73 20 68 |metachar|acters h|
|00001ee0| 61 73 0a 69 74 73 20 69 | 6e 70 75 74 20 61 6e 64 |as.its i|nput and|
|00001ef0| 20 6f 75 74 70 75 74 20 | 72 65 64 69 72 65 63 74 | output |redirect|
|00001f00| 65 64 20 74 6f 20 60 2f | 64 65 76 2f 6e 75 6c 6c |ed to `/|dev/null|
|00001f10| 27 2c 20 74 68 65 20 6e | 75 6c 6c 20 64 65 76 69 |', the n|ull devi|
|00001f20| 63 65 2c 0a 61 75 74 6f | 6d 61 74 69 63 61 6c 6c |ce,.auto|maticall|
|00001f30| 79 20 69 66 20 69 74 20 | 64 6f 65 73 20 6e 6f 74 |y if it |does not|
|00001f40| 20 61 6c 72 65 61 64 79 | 20 68 61 76 65 20 70 72 | already| have pr|
|00001f50| 65 65 78 69 73 74 69 6e | 67 20 69 6e 70 75 74 20 |eexistin|g input |
|00001f60| 61 6e 64 20 6f 75 74 70 | 75 74 0a 72 65 64 69 72 |and outp|ut.redir|
|00001f70| 65 63 74 69 6f 6e 73 2e | 20 54 68 69 73 20 69 73 |ections.| This is|
|00001f80| 20 74 6f 20 69 6e 73 75 | 72 65 20 74 68 61 74 20 | to insu|re that |
|00001f90| 62 61 63 6b 67 72 6f 75 | 6e 64 20 6a 6f 62 73 20 |backgrou|nd jobs |
|00001fa0| 64 6f 20 6e 6f 74 20 61 | 74 74 65 6d 70 74 20 74 |do not a|ttempt t|
|00001fb0| 6f 20 72 65 61 64 0a 66 | 72 6f 6d 20 6f 72 20 77 |o read.f|rom or w|
|00001fc0| 72 69 74 65 20 74 6f 20 | 74 68 65 20 74 65 72 6d |rite to |the term|
|00001fd0| 69 6e 61 6c 20 77 68 69 | 6c 65 20 79 6f 75 20 61 |inal whi|le you a|
|00001fe0| 72 65 20 64 6f 69 6e 67 | 20 73 6f 6d 65 74 68 69 |re doing| somethi|
|00001ff0| 6e 67 20 65 6c 73 65 2e | 20 54 68 69 73 0a 61 75 |ng else.| This.au|
|00002000| 74 6f 6d 61 74 69 63 20 | 72 65 64 69 72 65 63 74 |tomatic |redirect|
|00002010| 69 6f 6e 20 74 6f 20 60 | 2f 64 65 76 2f 6e 75 6c |ion to `|/dev/nul|
|00002020| 6c 27 20 63 61 6e 20 62 | 65 20 74 75 72 6e 65 64 |l' can b|e turned|
|00002030| 20 6f 66 66 20 62 79 20 | 73 65 74 74 69 6e 67 20 | off by |setting |
|00002040| 74 68 65 0a 58 2e 49 20 | 6e 6f 62 67 6e 75 6c 6c |the.X.I |nobgnull|
|00002050| 0a 73 68 65 6c 6c 20 76 | 61 72 69 61 62 6c 65 2c |.shell v|ariable,|
|00002060| 20 68 6f 77 65 76 65 72 | 20 69 74 20 69 73 20 72 | however| it is r|
|00002070| 65 63 6f 6d 6d 65 6e 64 | 65 64 20 74 68 61 74 20 |ecommend|ed that |
|00002080| 69 66 20 79 6f 75 20 64 | 65 73 69 72 65 20 74 65 |if you d|esire te|
|00002090| 72 6d 69 6e 61 6c 20 69 | 6e 70 75 74 0a 6f 72 20 |rminal i|nput.or |
|000020a0| 6f 75 74 70 75 74 20 66 | 6f 72 20 62 61 63 6b 67 |output f|or backg|
|000020b0| 72 6f 75 6e 64 20 6a 6f | 62 73 2c 20 79 6f 75 20 |round jo|bs, you |
|000020c0| 65 78 70 6c 69 63 69 74 | 6c 79 20 73 70 65 63 69 |explicit|ly speci|
|000020d0| 66 79 20 73 75 63 68 20 | 62 79 20 72 65 64 69 72 |fy such |by redir|
|000020e0| 65 63 74 69 6e 67 0a 74 | 68 65 20 61 70 70 72 6f |ecting.t|he appro|
|000020f0| 70 72 69 61 74 65 20 64 | 65 73 63 72 69 70 74 6f |priate d|escripto|
|00002100| 72 73 20 74 6f 20 6f 72 | 20 66 72 6f 6d 20 60 2f |rs to or| from `/|
|00002110| 64 65 76 2f 74 74 79 27 | 20 77 68 69 63 68 20 69 |dev/tty'| which i|
|00002120| 73 20 61 20 73 79 73 74 | 65 6d 20 63 6f 6e 73 74 |s a syst|em const|
|00002130| 72 75 63 74 0a 74 6f 20 | 65 71 75 61 74 65 20 74 |ruct.to |equate t|
|00002140| 6f 20 79 6f 75 72 20 63 | 75 72 72 65 6e 74 20 74 |o your c|urrent t|
|00002150| 74 79 20 28 77 68 69 63 | 68 20 69 73 20 61 6c 73 |ty (whic|h is als|
|00002160| 6f 20 67 69 76 65 6e 20 | 69 6e 20 74 68 65 20 73 |o given |in the s|
|00002170| 74 72 69 6e 67 20 76 61 | 72 69 61 62 6c 65 0a 58 |tring va|riable.X|
|00002180| 2e 49 20 74 74 79 0a 58 | 29 2e 20 4a 6f 62 73 20 |.I tty.X|). Jobs |
|00002190| 73 70 61 77 6e 65 64 20 | 77 69 74 68 20 60 26 21 |spawned |with `&!|
|000021a0| 27 20 61 72 65 20 69 6e | 20 61 64 64 69 74 69 6f |' are in| additio|
|000021b0| 6e 20 64 69 73 73 6f 63 | 69 61 74 65 64 20 66 72 |n dissoc|iated fr|
|000021c0| 6f 6d 20 74 68 65 0a 74 | 65 72 6d 69 6e 61 6c 20 |om the.t|erminal |
|000021d0| 65 6e 74 69 72 65 6c 79 | 20 61 6e 64 20 74 68 65 |entirely| and the|
|000021e0| 20 73 68 65 6c 6c 20 77 | 69 6c 6c 20 6e 6f 20 6c | shell w|ill no l|
|000021f0| 6f 6e 67 65 72 20 6b 65 | 65 70 20 74 72 61 63 6b |onger ke|ep track|
|00002200| 20 6f 66 20 74 68 65 73 | 65 20 6a 6f 62 73 2e 0a | of thes|e jobs..|
|00002210| 54 68 69 73 20 61 6c 6c | 6f 77 73 20 74 68 65 20 |This all|ows the |
|00002220| 75 73 65 72 20 74 6f 20 | 73 70 61 77 6e 20 61 20 |user to |spawn a |
|00002230| 62 61 63 6b 67 72 6f 75 | 6e 64 20 6a 6f 62 2c 20 |backgrou|nd job, |
|00002240| 74 68 65 6e 20 6c 6f 67 | 6f 75 74 20 77 69 74 68 |then log|out with|
|00002250| 6f 75 74 20 68 61 76 69 | 6e 67 0a 62 61 63 6b 67 |out havi|ng.backg|
|00002260| 72 6f 75 6e 64 20 6a 6f | 62 73 20 22 68 61 6e 67 |round jo|bs "hang|
|00002270| 20 6f 6e 22 20 74 6f 20 | 74 68 65 20 74 74 79 2c | on" to |the tty,|
|00002280| 20 73 6f 6d 65 74 69 6d | 65 73 20 63 61 75 73 69 | sometim|es causi|
|00002290| 6e 67 20 69 6e 63 6f 6e | 76 65 6e 69 65 6e 63 65 |ng incon|venience|
|000022a0| 20 74 6f 0a 74 68 65 20 | 6e 65 78 74 20 75 73 65 | to.the |next use|
|000022b0| 72 2e 0a 58 0a 58 2e 53 | 48 20 43 4f 4d 4d 41 4e |r..X.X.S|H COMMAN|
|000022c0| 44 20 4c 49 4e 45 20 49 | 4e 50 55 54 0a 58 0a 54 |D LINE I|NPUT.X.T|
|000022d0| 68 65 20 73 68 65 6c 6c | 73 20 69 6e 70 75 74 20 |he shell|s input |
|000022e0| 72 6f 75 74 69 6e 65 73 | 20 73 75 70 70 6f 72 74 |routines| support|
|000022f0| 20 73 6f 6d 65 20 32 30 | 2b 20 65 64 69 74 69 6e | some 20|+ editin|
|00002300| 67 20 66 75 6e 63 74 69 | 6f 6e 73 2e 20 20 4e 6f |g functi|ons. No|
|00002310| 6e 65 20 6f 66 20 74 68 | 65 73 65 0a 66 75 6e 63 |ne of th|ese.func|
|00002320| 74 69 6f 6e 73 20 61 72 | 65 20 61 75 74 6f 6d 61 |tions ar|e automa|
|00002330| 74 69 63 61 6c 6c 79 20 | 62 6f 75 6e 64 20 74 6f |tically |bound to|
|00002340| 20 6b 65 79 73 20 68 6f | 77 65 76 65 72 2c 20 61 | keys ho|wever, a|
|00002350| 6e 64 20 73 68 6f 75 6c | 64 20 62 65 20 64 65 66 |nd shoul|d be def|
|00002360| 69 6e 65 64 20 69 6e 0a | 74 68 65 20 67 6c 6f 62 |ined in.|the glob|
|00002370| 61 6c 20 73 74 61 72 74 | 75 70 20 66 69 6c 65 0a |al start|up file.|
|00002380| 58 2e 49 20 2e 73 73 68 | 72 63 0a 69 6e 20 74 68 |X.I .ssh|rc.in th|
|00002390| 65 20 2f 75 73 72 2f 65 | 74 63 20 64 69 72 65 63 |e /usr/e|tc direc|
|000023a0| 74 6f 72 79 2e 20 20 54 | 68 65 73 65 20 66 75 6e |tory. T|hese fun|
|000023b0| 63 74 69 6f 6e 73 20 63 | 61 6e 20 62 65 20 61 64 |ctions c|an be ad|
|000023c0| 64 65 64 2c 20 63 68 61 | 6e 67 65 64 20 6f 72 20 |ded, cha|nged or |
|000023d0| 72 65 6d 6f 76 65 64 0a | 77 69 74 68 20 74 68 65 |removed.|with the|
|000023e0| 20 75 73 65 20 6f 66 20 | 74 68 65 0a 58 2e 49 20 | use of |the.X.I |
|000023f0| 6b 65 79 0a 61 6e 64 0a | 58 2e 49 20 75 6e 6b 65 |key.and.|X.I unke|
|00002400| 79 0a 62 75 69 6c 74 69 | 6e 20 63 6f 6d 6d 61 6e |y.builti|n comman|
|00002410| 64 73 2e 20 20 54 68 65 | 20 61 76 61 69 6c 61 62 |ds. The| availab|
|00002420| 6c 65 20 65 64 69 74 69 | 6e 67 20 66 75 6e 63 74 |le editi|ng funct|
|00002430| 69 6f 6e 73 20 61 72 65 | 20 64 65 73 63 72 69 62 |ions are| describ|
|00002440| 65 64 20 62 72 69 65 66 | 6c 79 0a 62 65 6c 6f 77 |ed brief|ly.below|
|00002450| 20 69 6e 20 74 68 65 20 | 64 65 73 63 72 69 70 74 | in the |descript|
|00002460| 69 6f 6e 20 6f 66 20 74 | 68 65 20 62 75 69 6c 74 |ion of t|he built|
|00002470| 69 6e 20 63 6f 6d 6d 61 | 6e 64 0a 58 2e 49 20 6b |in comma|nd.X.I k|
|00002480| 65 79 2e 0a 58 0a 41 6e | 20 65 78 61 6d 70 6c 65 |ey..X.An| example|
|00002490| 20 6f 66 20 64 65 66 69 | 6e 69 6e 67 20 61 6e 20 | of defi|ning an |
|000024a0| 65 64 69 74 69 6e 67 20 | 6d 61 63 72 6f 3a 0a 58 |editing |macro:.X|
|000024b0| 2e 62 72 0a 58 0a 58 20 | 20 20 20 20 6b 65 79 20 |.br.X.X | key |
|000024c0| 2d 66 35 20 22 5c 5c 30 | 31 30 22 0a 58 2e 62 72 |-f5 "\\0|10".X.br|
|000024d0| 0a 58 0a 54 68 69 73 20 | 6d 61 63 72 6f 20 64 65 |.X.This |macro de|
|000024e0| 66 69 6e 65 73 20 74 68 | 65 20 62 61 63 6b 73 70 |fines th|e backsp|
|000024f0| 61 63 65 20 6b 65 79 20 | 28 6f 63 74 61 6c 20 30 |ace key |(octal 0|
|00002500| 31 30 29 20 61 73 20 61 | 20 64 65 6c 65 74 65 20 |10) as a| delete |
|00002510| 70 72 65 76 69 6f 75 73 | 0a 63 68 61 72 61 63 74 |previous|.charact|
|00002520| 65 72 20 28 66 75 6e 63 | 74 69 6f 6e 20 35 29 20 |er (func|tion 5) |
|00002530| 65 64 69 74 69 6e 67 20 | 66 75 6e 63 74 69 6f 6e |editing |function|
|00002540| 2e 20 20 4d 6f 72 65 20 | 74 68 61 6e 20 6f 6e 65 |. More |than one|
|00002550| 20 6b 65 79 20 73 65 71 | 75 65 6e 63 65 20 63 61 | key seq|uence ca|
|00002560| 6e 20 62 65 0a 62 6f 75 | 6e 64 20 74 6f 20 74 68 |n be.bou|nd to th|
|00002570| 65 20 73 61 6d 65 20 66 | 75 6e 63 74 69 6f 6e 2c |e same f|unction,|
|00002580| 20 74 68 75 73 20 73 65 | 76 65 72 61 6c 20 6b 65 | thus se|veral ke|
|00002590| 79 73 20 63 61 6e 20 62 | 65 20 6d 61 64 65 20 74 |ys can b|e made t|
|000025a0| 6f 20 64 65 6c 65 74 65 | 20 74 68 65 0a 70 72 65 |o delete| the.pre|
|000025b0| 76 69 6f 75 73 20 63 68 | 61 72 61 63 74 65 72 20 |vious ch|aracter |
|000025c0| 28 74 68 65 20 61 75 74 | 68 6f 72 20 6c 69 6b 65 |(the aut|hor like|
|000025d0| 73 20 74 6f 20 6d 61 6b | 65 20 74 68 65 20 62 61 |s to mak|e the ba|
|000025e0| 63 6b 73 70 61 63 65 20 | 61 6e 64 20 64 65 6c 65 |ckspace |and dele|
|000025f0| 74 65 0a 70 65 72 66 6f | 72 6d 20 74 68 65 20 73 |te.perfo|rm the s|
|00002600| 61 6d 65 20 66 75 6e 63 | 74 69 6f 6e 20 62 65 63 |ame func|tion bec|
|00002610| 61 75 73 65 20 74 68 65 | 79 20 61 72 65 20 76 65 |ause the|y are ve|
|00002620| 72 79 20 6e 65 61 72 20 | 65 61 63 68 20 6f 74 68 |ry near |each oth|
|00002630| 65 72 20 6f 6e 20 68 69 | 73 0a 6b 65 79 62 6f 61 |er on hi|s.keyboa|
|00002640| 72 64 29 2e 0a 58 0a 54 | 68 6f 73 65 20 77 69 74 |rd)..X.T|hose wit|
|00002650| 68 20 66 75 6e 63 74 69 | 6f 6e 20 6b 65 79 70 61 |h functi|on keypa|
|00002660| 64 73 20 28 6c 69 6b 65 | 20 6d 6f 73 74 20 76 74 |ds (like| most vt|
|00002670| 31 30 30 20 6b 65 79 62 | 6f 61 72 64 73 29 2c 20 |100 keyb|oards), |
|00002680| 6d 61 79 20 64 65 66 69 | 6e 65 20 6b 65 79 70 61 |may defi|ne keypa|
|00002690| 64 0a 6b 65 79 73 20 61 | 73 20 6d 61 63 72 6f 73 |d.keys a|s macros|
|000026a0| 20 66 6f 72 20 65 64 69 | 74 69 6e 67 20 6f 72 20 | for edi|ting or |
|000026b0| 74 6f 20 71 75 69 63 6b | 6c 79 20 74 79 70 65 20 |to quick|ly type |
|000026c0| 6f 75 74 20 6c 61 72 67 | 65 20 63 6f 6d 6d 61 6e |out larg|e comman|
|000026d0| 64 73 2e 20 20 41 6e 0a | 65 78 61 6d 70 6c 65 20 |ds. An.|example |
|000026e0| 6f 66 20 61 20 6b 65 79 | 20 6d 61 63 72 6f 20 69 |of a key| macro i|
|000026f0| 73 20 61 73 73 69 67 6e | 69 6e 67 20 63 6f 6e 74 |s assign|ing cont|
|00002700| 72 6f 6c 2d 44 20 74 6f | 20 6c 6f 67 6f 75 74 20 |rol-D to| logout |
|00002710| 74 68 65 20 75 73 65 72 | 3a 0a 58 2e 62 72 0a 58 |the user|:.X.br.X|
|00002720| 0a 58 20 20 20 20 20 6b | 65 79 20 2d 72 20 2d 63 |.X k|ey -r -c|
|00002730| 20 22 5c 5c 30 30 34 22 | 20 6c 6f 67 6f 75 74 0a | "\\004"| logout.|
|00002740| 58 2e 62 72 0a 58 0a 54 | 68 69 73 20 6d 61 63 72 |X.br.X.T|his macr|
|00002750| 6f 20 65 6d 75 6c 61 74 | 65 73 20 74 68 65 20 63 |o emulat|es the c|
|00002760| 73 68 20 73 68 65 6c 6c | 73 20 6c 6f 67 6f 75 74 |sh shell|s logout|
|00002770| 20 6f 6e 20 45 4f 46 2e | 20 20 54 68 65 20 60 2d | on EOF.| The `-|
|00002780| 72 27 20 6d 65 61 6e 73 | 20 74 6f 20 6d 61 6b 65 |r' means| to make|
|00002790| 0a 74 68 65 20 69 6e 70 | 75 74 20 72 6f 75 74 69 |.the inp|ut routi|
|000027a0| 6e 65 20 61 63 74 20 61 | 73 20 69 66 20 74 68 65 |ne act a|s if the|
|000027b0| 20 72 65 74 75 72 6e 20 | 6b 65 79 20 68 61 73 20 | return |key has |
|000027c0| 62 65 65 6e 20 70 72 65 | 73 73 65 64 20 61 66 74 |been pre|ssed aft|
|000027d0| 65 72 20 74 68 65 20 6d | 61 63 72 6f 0a 68 61 73 |er the m|acro.has|
|000027e0| 20 62 65 65 6e 20 69 6e | 73 65 72 74 65 64 20 6f | been in|serted o|
|000027f0| 6e 74 6f 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |nto the |command |
|00002800| 6c 69 6e 65 2e 20 54 68 | 65 20 60 2d 63 27 20 6d |line. Th|e `-c' m|
|00002810| 65 61 6e 73 20 74 6f 20 | 63 6c 65 61 72 20 74 68 |eans to |clear th|
|00002820| 65 20 63 6f 6d 6d 61 6e | 64 0a 6c 69 6e 65 20 62 |e comman|d.line b|
|00002830| 65 66 6f 72 65 20 69 6e | 73 65 72 74 69 6e 67 20 |efore in|serting |
|00002840| 74 68 65 20 6d 61 63 72 | 6f 20 73 74 72 69 6e 67 |the macr|o string|
|00002850| 2e 20 20 54 68 65 20 22 | 5c 5c 30 30 34 22 20 69 |. The "|\\004" i|
|00002860| 73 20 74 68 65 20 6b 65 | 79 20 73 65 71 75 65 6e |s the ke|y sequen|
|00002870| 63 65 20 74 6f 0a 62 69 | 6e 64 20 74 68 65 20 6d |ce to.bi|nd the m|
|00002880| 61 63 72 6f 20 73 74 72 | 69 6e 67 20 74 6f 20 28 |acro str|ing to (|
|00002890| 69 6e 20 74 68 69 73 20 | 63 61 73 65 20 5e 44 29 |in this |case ^D)|
|000028a0| 2c 20 61 6e 64 20 60 6c | 6f 67 6f 75 74 27 20 69 |, and `l|ogout' i|
|000028b0| 73 20 74 68 65 20 6d 61 | 63 72 6f 20 73 74 72 69 |s the ma|cro stri|
|000028c0| 6e 67 2e 0a 58 0a 54 68 | 65 20 73 68 65 6c 6c 73 |ng..X.Th|e shells|
|000028d0| 20 6d 61 63 72 6f 20 72 | 6f 75 74 69 6e 65 73 20 | macro r|outines |
|000028e0| 61 6c 73 6f 20 73 75 70 | 70 6f 72 74 20 74 68 65 |also sup|port the|
|000028f0| 20 63 6f 6e 63 65 70 74 | 20 6f 66 20 6b 65 79 70 | concept| of keyp|
|00002900| 61 64 20 6c 65 76 65 6c | 73 20 61 6e 64 0a 58 60 |ad level|s and.X`|
|00002910| 67 6f 6c 64 20 6b 65 79 | 73 27 2e 20 20 4b 65 79 |gold key|s'. Key|
|00002920| 70 61 64 20 6c 65 76 65 | 6c 73 20 63 61 6e 20 62 |pad leve|ls can b|
|00002930| 65 20 74 68 6f 75 67 68 | 74 20 6f 66 20 61 73 20 |e though|t of as |
|00002940| 61 20 73 74 61 63 6b 20 | 6f 66 20 6b 65 79 70 61 |a stack |of keypa|
|00002950| 64 73 2c 20 65 61 63 68 | 0a 77 69 74 68 20 74 68 |ds, each|.with th|
|00002960| 65 69 72 20 6f 77 6e 20 | 6d 61 63 72 6f 73 20 61 |eir own |macros a|
|00002970| 6e 64 20 66 75 6e 63 74 | 69 6f 6e 20 62 69 6e 64 |nd funct|ion bind|
|00002980| 69 6e 67 73 2e 20 20 54 | 68 65 20 70 75 72 70 6f |ings. T|he purpo|
|00002990| 73 65 20 6f 66 20 67 6f | 6c 64 20 6b 65 79 73 20 |se of go|ld keys |
|000029a0| 69 73 20 74 6f 0a 63 68 | 61 6e 67 65 20 74 68 65 |is to.ch|ange the|
|000029b0| 20 63 75 72 72 65 6e 74 | 20 6b 65 79 70 61 64 20 | current| keypad |
|000029c0| 6c 65 76 65 6c 20 77 68 | 65 6e 20 69 74 20 69 73 |level wh|en it is|
|000029d0| 20 70 72 65 73 73 65 64 | 2e 20 20 41 6e 20 65 78 | pressed|. An ex|
|000029e0| 61 6d 70 6c 65 3a 0a 58 | 2e 62 72 0a 58 0a 58 20 |ample:.X|.br.X.X |
|000029f0| 20 20 20 20 6b 65 79 20 | 2d 6c 30 20 2d 67 31 20 | key |-l0 -g1 |
|00002a00| 22 5c 5c 30 33 33 4f 50 | 22 0a 58 2e 62 72 0a 58 |"\\033OP|".X.br.X|
|00002a10| 20 20 20 20 20 6b 65 79 | 20 2d 6c 31 20 2d 67 30 | key| -l1 -g0|
|00002a20| 20 22 5c 5c 30 33 33 4f | 50 22 0a 58 2e 62 72 0a | "\\033O|P".X.br.|
|00002a30| 58 0a 54 68 65 73 65 20 | 6d 61 6b 65 20 74 68 65 |X.These |make the|
|00002a40| 20 76 74 31 30 30 20 50 | 46 31 20 6b 65 79 20 61 | vt100 P|F1 key a|
|00002a50| 20 67 6f 6c 64 20 6b 65 | 79 20 77 68 69 63 68 20 | gold ke|y which |
|00002a60| 74 6f 67 67 6c 65 73 20 | 62 65 74 77 65 65 6e 20 |toggles |between |
|00002a70| 6b 65 79 70 61 64 20 6c | 65 76 65 6c 73 0a 7a 65 |keypad l|evels.ze|
|00002a80| 72 6f 20 61 6e 64 20 6f | 6e 65 20 28 6c 65 76 65 |ro and o|ne (leve|
|00002a90| 6c 20 7a 65 72 6f 20 69 | 73 20 74 68 65 20 64 65 |l zero i|s the de|
|00002aa0| 66 61 75 6c 74 29 2e 20 | 20 54 68 65 20 60 2d 6c |fault). | The `-l|
|00002ab0| 6e 27 20 61 73 73 69 67 | 6e 73 20 74 68 65 20 67 |n' assig|ns the g|
|00002ac0| 6f 6c 64 20 6b 65 79 20 | 74 6f 0a 6b 65 79 70 61 |old key |to.keypa|
|00002ad0| 64 20 6c 65 76 65 6c 0a | 58 2e 49 20 6e 0a 61 6e |d level.|X.I n.an|
|00002ae0| 64 20 74 68 65 20 60 2d | 67 6e 27 20 64 65 66 69 |d the `-|gn' defi|
|00002af0| 6e 65 73 20 74 68 65 20 | 6b 65 79 20 73 65 71 75 |nes the |key sequ|
|00002b00| 65 6e 63 65 20 61 73 20 | 61 20 67 6f 6c 64 20 6b |ence as |a gold k|
|00002b10| 65 79 2c 20 74 68 61 74 | 20 77 68 65 6e 20 70 72 |ey, that| when pr|
|00002b20| 65 73 73 65 64 2c 20 73 | 65 74 73 0a 74 68 65 20 |essed, s|ets.the |
|00002b30| 6b 65 79 70 61 64 20 74 | 6f 20 6c 65 76 65 6c 0a |keypad t|o level.|
|00002b40| 58 2e 49 20 6e 2e 0a 54 | 68 65 20 73 68 65 6c 6c |X.I n..T|he shell|
|00002b50| 20 6d 61 69 6e 74 61 69 | 6e 73 20 61 20 73 74 61 | maintai|ns a sta|
|00002b60| 63 6b 20 6f 66 20 31 30 | 20 6b 65 79 70 61 64 20 |ck of 10| keypad |
|00002b70| 6c 65 76 65 6c 73 20 28 | 30 2d 39 29 2e 0a 58 0a |levels (|0-9)..X.|
|00002b80| 58 2e 53 48 20 53 54 41 | 54 55 53 20 52 45 50 4f |X.SH STA|TUS REPO|
|00002b90| 52 54 49 4e 47 0a 58 0a | 54 68 65 20 73 68 65 6c |RTING.X.|The shel|
|00002ba0| 6c 20 70 65 72 66 6f 72 | 6d 73 20 73 74 61 74 75 |l perfor|ms statu|
|00002bb0| 73 20 72 65 70 6f 72 74 | 69 6e 67 20 6f 66 20 63 |s report|ing of c|
|00002bc0| 68 61 6e 67 65 73 20 69 | 6e 20 74 68 65 20 73 74 |hanges i|n the st|
|00002bd0| 61 74 65 20 6f 66 20 61 | 20 6a 6f 62 20 69 6e 20 |ate of a| job in |
|00002be0| 61 6e 0a 61 73 79 6e 63 | 68 72 6f 6e 6f 75 73 20 |an.async|hronous |
|00002bf0| 6d 61 6e 6e 65 72 2e 20 | 20 49 66 20 74 68 65 20 |manner. | If the |
|00002c00| 73 68 65 6c 6c 20 69 74 | 73 65 6c 66 20 64 6f 65 |shell it|self doe|
|00002c10| 73 20 6e 6f 74 20 68 61 | 76 65 20 63 6f 6e 74 72 |s not ha|ve contr|
|00002c20| 6f 6c 20 6f 66 20 74 68 | 65 0a 74 65 72 6d 69 6e |ol of th|e.termin|
|00002c30| 61 6c 20 28 74 68 65 72 | 65 66 6f 72 65 20 69 73 |al (ther|efore is|
|00002c40| 20 77 61 69 74 69 6e 67 | 20 66 6f 72 20 61 20 70 | waiting| for a p|
|00002c50| 72 6f 63 65 73 73 20 74 | 6f 20 63 6f 6d 70 6c 65 |rocess t|o comple|
|00002c60| 74 65 29 2c 20 74 68 65 | 20 73 74 61 74 75 73 20 |te), the| status |
|00002c70| 6f 66 0a 63 68 69 6c 64 | 20 70 72 6f 63 65 73 73 |of.child| process|
|00002c80| 65 73 20 77 69 6c 6c 20 | 6e 6f 74 20 62 65 20 72 |es will |not be r|
|00002c90| 65 70 6f 72 74 65 64 2e | 0a 58 0a 53 68 6f 75 6c |eported.|.X.Shoul|
|00002ca0| 64 20 79 6f 75 20 61 74 | 74 65 6d 70 74 20 74 6f |d you at|tempt to|
|00002cb0| 20 6c 6f 67 6f 75 74 20 | 6f 66 20 79 6f 75 72 20 | logout |of your |
|00002cc0| 73 68 65 6c 6c 20 77 68 | 69 6c 65 20 79 6f 75 20 |shell wh|ile you |
|00002cd0| 68 61 76 65 20 73 74 6f | 70 70 65 64 20 6a 6f 62 |have sto|pped job|
|00002ce0| 73 2c 20 79 6f 75 0a 77 | 69 6c 6c 20 62 65 20 6e |s, you.w|ill be n|
|00002cf0| 6f 74 69 66 69 65 64 20 | 77 69 74 68 20 74 68 65 |otified |with the|
|00002d00| 20 6d 65 73 73 61 67 65 | 20 60 59 6f 75 20 68 61 | message| `You ha|
|00002d10| 76 65 20 73 74 6f 70 70 | 65 64 20 6a 6f 62 73 2e |ve stopp|ed jobs.|
|00002d20| 27 20 61 6e 64 20 77 69 | 6c 6c 20 6e 6f 74 0a 6c |' and wi|ll not.l|
|00002d30| 6f 67 6f 75 74 2e 20 54 | 68 65 20 73 68 65 6c 6c |ogout. T|he shell|
|00002d40| 20 77 69 6c 6c 20 6e 6f | 74 20 61 6c 65 72 74 20 | will no|t alert |
|00002d50| 79 6f 75 20 61 20 73 65 | 63 6f 6e 64 20 74 69 6d |you a se|cond tim|
|00002d60| 65 20 68 6f 77 65 76 65 | 72 2c 20 61 6c 6c 6f 77 |e howeve|r, allow|
|00002d70| 69 6e 67 20 79 6f 75 20 | 74 6f 0a 6c 6f 67 6f 75 |ing you |to.logou|
|00002d80| 74 20 6e 6f 72 6d 61 6c | 6c 79 2e 20 20 41 6e 79 |t normal|ly. Any|
|00002d90| 20 73 74 6f 70 70 65 64 | 20 6a 6f 62 73 20 70 72 | stopped| jobs pr|
|00002da0| 65 73 65 6e 74 20 61 74 | 20 6c 6f 67 6f 75 74 20 |esent at| logout |
|00002db0| 77 69 6c 6c 20 6e 6f 20 | 64 6f 75 62 74 20 62 65 |will no |doubt be|
|00002dc0| 20 6b 69 6c 6c 65 64 2e | 0a 58 0a 58 2e 53 48 20 | killed.|.X.X.SH |
|00002dd0| 53 55 42 53 54 49 54 55 | 54 49 4f 4e 53 0a 58 0a |SUBSTITU|TIONS.X.|
|00002de0| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 64 65 |The foll|owing de|
|00002df0| 73 63 72 69 62 65 20 74 | 68 65 20 76 61 72 69 6f |scribe t|he vario|
|00002e00| 75 73 20 73 75 62 73 74 | 69 74 75 74 69 6f 6e 73 |us subst|itutions|
|00002e10| 20 6f 66 20 74 68 65 20 | 69 6e 70 75 74 20 6c 69 | of the |input li|
|00002e20| 6e 65 20 70 65 72 66 6f | 72 6d 65 64 0a 62 79 20 |ne perfo|rmed.by |
|00002e30| 74 68 65 20 73 68 65 6c | 6c 20 61 6e 64 20 69 6e |the shel|l and in|
|00002e40| 20 74 68 65 20 6f 72 64 | 65 72 20 74 68 61 74 20 | the ord|er that |
|00002e50| 74 68 65 79 20 6f 63 63 | 75 72 2e 0a 58 0a 58 2e |they occ|ur..X.X.|
|00002e60| 53 48 20 43 4f 4d 4d 41 | 4e 44 20 53 55 42 53 54 |SH COMMA|ND SUBST|
|00002e70| 49 54 55 54 49 4f 4e 0a | 58 0a 43 6f 6d 6d 61 6e |ITUTION.|X.Comman|
|00002e80| 64 73 20 65 6e 63 6c 6f | 73 65 64 20 69 6e 20 60 |ds enclo|sed in `|
|00002e90| 60 27 20 61 72 65 20 70 | 61 72 73 65 64 20 61 6e |`' are p|arsed an|
|00002ea0| 64 20 65 78 65 63 75 74 | 65 64 20 62 65 66 6f 72 |d execut|ed befor|
|00002eb0| 65 20 61 6e 79 20 6f 74 | 68 65 72 0a 73 75 62 73 |e any ot|her.subs|
|00002ec0| 74 69 74 75 74 69 6f 6e | 73 20 61 72 65 20 64 6f |titution|s are do|
|00002ed0| 6e 65 20 6f 6e 20 74 68 | 65 20 63 6f 6d 6d 61 6e |ne on th|e comman|
|00002ee0| 64 20 6c 69 6e 65 2e 20 | 20 54 68 65 20 6f 75 74 |d line. | The out|
|00002ef0| 70 75 74 20 6f 66 20 74 | 68 65 73 65 20 63 6f 6d |put of t|hese com|
|00002f00| 6d 61 6e 64 73 20 69 73 | 0a 70 6c 61 63 65 64 20 |mands is|.placed |
|00002f10| 62 61 63 6b 20 69 6e 74 | 6f 20 74 68 65 20 63 6f |back int|o the co|
|00002f20| 6d 6d 61 6e 64 20 6c 69 | 6e 65 20 69 6e 20 70 6c |mmand li|ne in pl|
|00002f30| 61 63 65 20 6f 66 20 74 | 68 65 20 63 6f 6d 6d 61 |ace of t|he comma|
|00002f40| 6e 64 20 73 74 72 69 6e | 67 2e 20 20 54 68 65 0a |nd strin|g. The.|
|00002f50| 72 65 73 75 6c 74 69 6e | 67 20 63 6f 6d 6d 61 6e |resultin|g comman|
|00002f60| 64 20 6c 69 6e 65 20 69 | 73 20 74 68 65 6e 20 73 |d line i|s then s|
|00002f70| 75 62 6a 65 63 74 20 74 | 6f 20 74 68 65 20 72 65 |ubject t|o the re|
|00002f80| 6d 61 69 6e 69 6e 67 20 | 73 75 62 73 74 69 74 75 |maining |substitu|
|00002f90| 74 69 6f 6e 73 2e 0a 58 | 0a 54 68 65 20 6f 75 74 |tions..X|.The out|
|00002fa0| 70 75 74 20 6f 66 20 74 | 68 65 73 65 20 63 6f 6d |put of t|hese com|
|00002fb0| 6d 61 6e 64 73 20 61 72 | 65 20 6e 6f 72 6d 61 6c |mands ar|e normal|
|00002fc0| 6c 79 20 62 72 6f 6b 65 | 6e 20 75 70 20 69 6e 74 |ly broke|n up int|
|00002fd0| 6f 20 77 6f 72 64 73 20 | 69 6e 20 61 6e 0a 69 64 |o words |in an.id|
|00002fe0| 65 6e 74 69 63 61 6c 20 | 66 61 73 68 69 6f 6e 20 |entical |fashion |
|00002ff0| 61 73 20 64 65 73 63 72 | 69 62 65 64 20 61 62 6f |as descr|ibed abo|
|00003000| 76 65 20 69 6e 20 74 68 | 65 20 6c 65 78 69 63 61 |ve in th|e lexica|
|00003010| 6c 20 73 74 72 75 63 74 | 75 72 65 2c 20 73 61 76 |l struct|ure, sav|
|00003020| 65 20 74 68 61 74 0a 6e | 65 77 6c 69 6e 65 73 20 |e that.n|ewlines |
|00003030| 61 6e 64 20 6e 75 6c 6c | 20 77 6f 72 64 73 20 61 |and null| words a|
|00003040| 72 65 20 64 69 73 63 61 | 72 64 65 64 2e 0a 58 0a |re disca|rded..X.|
|00003050| 58 2e 53 48 20 41 4c 49 | 41 53 20 53 55 42 53 54 |X.SH ALI|AS SUBST|
|00003060| 49 54 55 54 49 4f 4e 0a | 58 0a 41 66 74 65 72 20 |ITUTION.|X.After |
|00003070| 63 6f 6d 6d 61 6e 64 20 | 73 75 62 73 74 69 74 75 |command |substitu|
|00003080| 74 69 6f 6e 20 69 73 20 | 70 65 72 66 6f 72 6d 65 |tion is |performe|
|00003090| 64 2c 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 6c |d, the c|ommand l|
|000030a0| 69 6e 65 20 69 73 20 70 | 61 72 73 65 64 20 69 6e |ine is p|arsed in|
|000030b0| 74 6f 0a 64 69 73 74 69 | 6e 63 74 20 63 6f 6d 6d |to.disti|nct comm|
|000030c0| 61 6e 64 73 2c 20 61 6e | 64 20 74 68 65 20 66 69 |ands, an|d the fi|
|000030d0| 72 73 74 20 77 6f 72 64 | 20 6f 66 20 65 61 63 68 |rst word| of each|
|000030e0| 20 63 6f 6d 6d 61 6e 64 | 20 69 73 20 73 63 61 6e | command| is scan|
|000030f0| 6e 65 64 20 74 6f 20 73 | 65 65 20 69 66 0a 69 74 |ned to s|ee if.it|
|00003100| 20 63 6f 72 72 65 73 70 | 6f 6e 64 73 20 74 6f 20 | corresp|onds to |
|00003110| 6f 6e 65 20 6f 66 20 74 | 68 65 20 61 6c 69 61 73 |one of t|he alias|
|00003120| 65 73 20 73 65 74 75 70 | 20 62 79 20 74 68 65 20 |es setup| by the |
|00003130| 75 73 65 72 2e 20 20 49 | 66 20 61 20 6d 61 74 63 |user. I|f a matc|
|00003140| 68 20 69 73 0a 66 6f 75 | 6e 64 2c 20 74 68 65 20 |h is.fou|nd, the |
|00003150| 63 6f 6d 6d 61 6e 64 20 | 6c 69 6e 65 20 69 73 20 |command |line is |
|00003160| 72 65 70 6c 61 63 65 64 | 20 65 6e 74 69 72 65 6c |replaced| entirel|
|00003170| 79 20 62 79 20 74 68 65 | 20 61 6c 69 61 73 2c 20 |y by the| alias, |
|00003180| 70 6c 61 63 69 6e 67 20 | 61 72 67 75 6d 65 6e 74 |placing |argument|
|00003190| 73 0a 69 6e 74 6f 20 74 | 68 65 20 6e 65 77 20 63 |s.into t|he new c|
|000031a0| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 20 77 68 65 72 |ommand l|ine wher|
|000031b0| 65 20 69 6e 64 69 63 61 | 74 65 64 20 62 79 20 74 |e indica|ted by t|
|000031c0| 68 65 20 61 6c 69 61 73 | 2e 20 20 41 6e 20 61 6c |he alias|. An al|
|000031d0| 69 61 73 20 63 6f 6e 74 | 61 69 6e 73 0a 73 77 69 |ias cont|ains.swi|
|000031e0| 74 63 68 65 73 2c 20 73 | 69 67 6e 69 66 69 65 64 |tches, s|ignified|
|000031f0| 20 62 79 20 61 20 60 25 | 27 2c 20 74 68 61 74 20 | by a `%|', that |
|00003200| 73 70 65 63 69 66 79 20 | 74 68 65 20 61 72 67 75 |specify |the argu|
|00003210| 6d 65 6e 74 20 70 6c 61 | 63 65 6d 65 6e 74 20 64 |ment pla|cement d|
|00003220| 65 73 69 72 65 64 20 66 | 6f 72 0a 74 68 65 20 61 |esired f|or.the a|
|00003230| 6c 69 61 73 2e 20 20 54 | 68 65 73 65 20 73 77 69 |lias. T|hese swi|
|00003240| 74 63 68 65 73 20 61 72 | 65 20 65 76 61 6c 75 61 |tches ar|e evalua|
|00003250| 74 65 64 20 6c 65 66 74 | 20 74 6f 20 72 69 67 68 |ted left| to righ|
|00003260| 74 2c 20 61 6e 64 20 70 | 6c 61 63 65 20 74 68 65 |t, and p|lace the|
|00003270| 20 77 6f 72 64 73 0a 6f | 66 20 74 68 65 20 6f 6c | words.o|f the ol|
|00003280| 64 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 20 28 |d comman|d line (|
|00003290| 6e 75 6d 62 65 72 65 64 | 20 66 72 6f 6d 20 30 29 |numbered| from 0)|
|000032a0| 20 69 6e 74 6f 20 74 68 | 65 20 6e 65 77 20 63 6f | into th|e new co|
|000032b0| 6d 6d 61 6e 64 20 6c 69 | 6e 65 2e 20 57 68 65 6e |mmand li|ne. When|
|000032c0| 20 61 0a 77 6f 72 64 20 | 66 72 6f 6d 20 74 68 65 | a.word |from the|
|000032d0| 20 6f 6c 64 20 63 6f 6d | 6d 61 6e 64 20 6c 69 6e | old com|mand lin|
|000032e0| 65 20 69 73 20 69 6e 73 | 65 72 74 65 64 20 69 6e |e is ins|erted in|
|000032f0| 74 6f 20 74 68 65 20 6e | 65 77 20 63 6f 6d 6d 61 |to the n|ew comma|
|00003300| 6e 64 20 6c 69 6e 65 2c | 20 69 74 20 69 73 0a 73 |nd line,| it is.s|
|00003310| 61 69 64 20 74 6f 20 68 | 61 76 65 20 62 65 65 6e |aid to h|ave been|
|00003320| 20 75 73 65 64 2e 20 20 | 54 68 65 20 66 6f 6c 6c | used. |The foll|
|00003330| 6f 77 69 6e 67 20 69 73 | 20 61 20 6c 69 73 74 20 |owing is| a list |
|00003340| 6f 66 20 74 68 65 20 76 | 61 6c 69 64 20 73 77 69 |of the v|alid swi|
|00003350| 74 63 68 65 73 3a 0a 58 | 2e 54 50 0a 58 2e 42 49 |tches:.X|.TP.X.BI|
|00003360| 20 25 20 6e 0a 57 6f 72 | 64 20 6e 20 69 73 20 70 | % n.Wor|d n is p|
|00003370| 6c 61 63 65 64 20 68 65 | 72 65 2e 0a 58 2e 50 50 |laced he|re..X.PP|
|00003380| 0a 58 2e 54 50 0a 58 2e | 42 49 20 25 20 6e 2d 6d |.X.TP.X.|BI % n-m|
|00003390| 0a 57 6f 72 64 0a 58 2e | 49 20 6e 0a 74 68 72 6f |.Word.X.|I n.thro|
|000033a0| 75 67 68 0a 58 2e 49 20 | 6d 0a 61 72 65 20 70 6c |ugh.X.I |m.are pl|
|000033b0| 61 63 65 64 20 68 65 72 | 65 2e 0a 58 2e 50 50 0a |aced her|e..X.PP.|
|000033c0| 58 2e 54 50 0a 58 2e 42 | 20 25 2d 0a 41 6c 6c 20 |X.TP.X.B| %-.All |
|000033d0| 75 6e 75 73 65 64 20 77 | 6f 72 64 73 20 61 72 65 |unused w|ords are|
|000033e0| 20 70 6c 61 63 65 64 20 | 68 65 72 65 2e 0a 58 2e | placed |here..X.|
|000033f0| 50 50 0a 58 2e 54 50 0a | 58 2e 42 20 25 2b 0a 41 |PP.X.TP.|X.B %+.A|
|00003400| 6c 6c 20 70 72 65 76 69 | 6f 75 73 6c 79 20 75 73 |ll previ|ously us|
|00003410| 65 64 20 77 6f 72 64 73 | 20 61 72 65 20 70 6c 61 |ed words| are pla|
|00003420| 63 65 64 20 68 65 72 65 | 2e 0a 58 2e 50 50 0a 58 |ced here|..X.PP.X|
|00003430| 2e 54 50 0a 58 2e 42 20 | 25 25 0a 41 6c 6c 20 77 |.TP.X.B |%%.All w|
|00003440| 6f 72 64 73 20 61 72 65 | 20 70 6c 61 63 65 64 20 |ords are| placed |
|00003450| 68 65 72 65 2e 0a 58 2e | 50 50 0a 58 2e 54 50 0a |here..X.|PP.X.TP.|
|00003460| 58 2e 42 20 25 23 0a 50 | 6c 61 63 65 73 20 74 68 |X.B %#.P|laces th|
|00003470| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 77 6f 72 64 |e number| of word|
|00003480| 73 20 68 65 72 65 2e 20 | 55 73 65 66 75 6c 20 66 |s here. |Useful f|
|00003490| 6f 72 20 75 73 65 20 77 | 69 74 68 20 74 68 65 20 |or use w|ith the |
|000034a0| 73 69 6e 67 6c 65 20 6c | 69 6e 65 0a 69 66 2d 74 |single l|ine.if-t|
|000034b0| 68 65 6e 20 74 6f 20 69 | 6e 73 75 72 65 20 74 68 |hen to i|nsure th|
|000034c0| 65 20 63 6f 72 72 65 63 | 74 20 6e 75 6d 62 65 72 |e correc|t number|
|000034d0| 20 6f 66 20 77 6f 72 64 | 73 20 66 6f 72 20 61 6e | of word|s for an|
|000034e0| 20 61 6c 69 61 73 20 63 | 6f 6d 6d 61 6e 64 2e 0a | alias c|ommand..|
|000034f0| 58 2e 50 50 0a 58 0a 41 | 72 67 75 6d 65 6e 74 20 |X.PP.X.A|rgument |
|00003500| 7a 65 72 6f 20 69 73 20 | 69 67 6e 6f 72 65 64 20 |zero is |ignored |
|00003510| 66 6f 72 20 73 77 69 74 | 63 68 65 73 20 60 25 2d |for swit|ches `%-|
|00003520| 27 2c 20 60 25 2b 27 2c | 20 61 6e 64 20 60 25 25 |', `%+',| and `%%|
|00003530| 27 2e 20 54 68 65 73 65 | 20 73 77 69 74 63 68 65 |'. These| switche|
|00003540| 73 0a 6d 61 79 20 62 65 | 20 65 6d 62 65 64 64 65 |s.may be| embedde|
|00003550| 64 20 69 6e 20 61 20 77 | 6f 72 64 2c 20 61 6e 64 |d in a w|ord, and|
|00003560| 20 73 69 6e 63 65 20 74 | 68 69 73 20 73 75 62 73 | since t|his subs|
|00003570| 74 69 74 75 74 69 6f 6e | 20 69 73 20 72 65 63 75 |titution| is recu|
|00003580| 72 73 69 76 65 2c 0a 6d | 75 6c 74 69 70 6c 65 20 |rsive,.m|ultiple |
|00003590| 73 77 69 74 63 68 65 73 | 20 65 6d 62 65 64 64 65 |switches| embedde|
|000035a0| 64 20 69 6e 20 61 20 77 | 6f 72 64 20 77 69 6c 6c |d in a w|ord will|
|000035b0| 20 70 72 6f 64 75 63 65 | 20 65 76 65 72 79 20 70 | produce| every p|
|000035c0| 6f 73 73 69 62 6c 65 20 | 63 6f 6d 62 69 6e 61 74 |ossible |combinat|
|000035d0| 69 6f 6e 0a 6f 66 20 74 | 68 6f 73 65 20 77 6f 72 |ion.of t|hose wor|
|000035e0| 64 73 2e 20 45 78 61 6d | 70 6c 65 73 3a 0a 58 0a |ds. Exam|ples:.X.|
|000035f0| 58 2e 62 72 0a 58 3e 20 | 61 6c 69 61 73 20 78 20 |X.br.X> |alias x |
|00003600| 28 73 65 63 68 6f 20 25 | 25 2e 25 25 29 0a 58 2e |(secho %|%.%%).X.|
|00003610| 62 72 0a 58 3e 20 78 20 | 61 20 62 20 63 20 20 23 |br.X> x |a b c #|
|00003620| 77 69 6c 6c 20 79 69 65 | 6c 64 3a 0a 58 2e 62 72 |will yie|ld:.X.br|
|00003630| 0a 58 3e 20 73 65 63 68 | 6f 20 61 2e 61 20 61 2e |.X> sech|o a.a a.|
|00003640| 62 20 61 2e 63 20 62 2e | 61 20 62 2e 62 20 62 2e |b a.c b.|a b.b b.|
|00003650| 63 20 63 2e 61 20 63 2e | 62 20 63 2e 63 0a 58 0a |c c.a c.|b c.c.X.|
|00003660| 58 2e 62 72 0a 58 3e 20 | 61 6c 69 61 73 20 75 73 |X.br.X> |alias us|
|00003670| 65 72 20 28 6c 73 20 7e | 25 31 2d 31 30 29 0a 58 |er (ls ~|%1-10).X|
|00003680| 2e 62 72 0a 58 3e 20 75 | 73 65 72 20 61 61 20 62 |.br.X> u|ser aa b|
|00003690| 62 20 63 63 20 23 20 77 | 69 6c 6c 20 79 69 65 6c |b cc # w|ill yiel|
|000036a0| 64 3a 0a 58 2e 62 72 0a | 58 3e 20 6c 73 20 7e 61 |d:.X.br.|X> ls ~a|
|000036b0| 61 20 7e 62 62 20 7e 63 | 63 0a 58 0a 49 66 20 6e |a ~bb ~c|c.X.If n|
|000036c0| 6f 20 6d 61 74 63 68 65 | 73 20 61 72 65 20 70 6f |o matche|s are po|
|000036d0| 73 73 69 62 6c 65 20 66 | 6f 72 20 74 68 65 20 73 |ssible f|or the s|
|000036e0| 77 69 74 63 68 2c 20 74 | 68 65 6e 20 74 68 65 20 |witch, t|hen the |
|000036f0| 77 6f 72 64 20 74 68 65 | 20 73 77 69 74 63 68 20 |word the| switch |
|00003700| 61 70 70 65 61 72 73 0a | 69 6e 20 69 73 20 72 65 |appears.|in is re|
|00003710| 6d 6f 76 65 64 20 66 72 | 6f 6d 20 74 68 65 20 6e |moved fr|om the n|
|00003720| 65 77 20 63 6f 6d 6d 61 | 6e 64 20 6c 69 6e 65 2e |ew comma|nd line.|
|00003730| 20 42 79 20 64 65 66 61 | 75 6c 74 2c 20 69 66 20 | By defa|ult, if |
|00003740| 6e 6f 20 76 61 6c 69 64 | 20 61 72 67 75 6d 65 6e |no valid| argumen|
|00003750| 74 0a 73 77 69 74 63 68 | 65 73 20 61 72 65 20 63 |t.switch|es are c|
|00003760| 6f 6e 74 61 69 6e 65 64 | 20 69 6e 20 74 68 65 20 |ontained| in the |
|00003770| 61 6c 69 61 73 2c 20 74 | 68 65 6e 20 61 6c 6c 20 |alias, t|hen all |
|00003780| 74 68 65 20 77 6f 72 64 | 73 20 66 72 6f 6d 20 74 |the word|s from t|
|00003790| 68 65 20 6f 6c 64 20 63 | 6f 6d 6d 61 6e 64 0a 6c |he old c|ommand.l|
|000037a0| 69 6e 65 20 28 6d 69 6e | 75 73 20 74 68 65 20 63 |ine (min|us the c|
|000037b0| 6f 6d 6d 61 6e 64 29 20 | 61 72 65 20 70 6c 61 63 |ommand) |are plac|
|000037c0| 65 64 20 61 74 20 74 68 | 65 20 65 6e 64 20 6f 66 |ed at th|e end of|
|000037d0| 20 74 68 65 20 72 65 73 | 75 6c 74 69 6e 67 20 6e | the res|ulting n|
|000037e0| 65 77 20 63 6f 6d 6d 61 | 6e 64 0a 6c 69 6e 65 2e |ew comma|nd.line.|
|000037f0| 20 41 6c 69 61 73 20 70 | 61 72 73 69 6e 67 20 6f | Alias p|arsing o|
|00003800| 6e 6c 79 20 74 61 6b 65 | 73 20 70 6c 61 63 65 20 |nly take|s place |
|00003810| 6f 6e 63 65 2c 20 75 6e | 6c 69 6b 65 20 77 69 74 |once, un|like wit|
|00003820| 68 20 6f 74 68 65 72 20 | 73 68 65 6c 6c 73 2e 0a |h other |shells..|
|00003830| 58 0a 58 2e 53 48 20 56 | 41 52 49 41 42 4c 45 20 |X.X.SH V|ARIABLE |
|00003840| 53 55 42 53 54 49 54 55 | 54 49 4f 4e 0a 58 0a 53 |SUBSTITU|TION.X.S|
|00003850| 68 65 6c 6c 20 76 61 72 | 69 61 62 6c 65 73 20 61 |hell var|iables a|
|00003860| 72 65 20 75 73 65 64 20 | 62 79 20 74 68 65 20 73 |re used |by the s|
|00003870| 68 65 6c 6c 20 74 6f 20 | 6d 61 69 6e 74 61 69 6e |hell to |maintain|
|00003880| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 61 62 6f | informa|tion abo|
|00003890| 75 74 20 74 68 65 0a 75 | 73 65 72 73 20 63 75 72 |ut the.u|sers cur|
|000038a0| 72 65 6e 74 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |rent env|ironment|
|000038b0| 20 61 6e 64 20 62 79 20 | 74 68 65 20 75 73 65 72 | and by |the user|
|000038c0| 20 66 6f 72 20 68 69 73 | 20 6f 77 6e 20 65 6e 64 | for his| own end|
|000038d0| 73 2e 0a 58 2e 49 20 53 | 73 68 0a 70 72 6f 76 69 |s..X.I S|sh.provi|
|000038e0| 64 65 73 20 74 68 72 65 | 65 20 64 69 66 66 65 72 |des thre|e differ|
|000038f0| 65 6e 74 20 74 79 70 65 | 73 20 6f 66 20 76 61 72 |ent type|s of var|
|00003900| 69 61 62 6c 65 73 3a 20 | 73 74 72 69 6e 67 20 61 |iables: |string a|
|00003910| 6e 64 20 6e 75 6c 6c 20 | 76 61 72 69 61 62 6c 65 |nd null |variable|
|00003920| 73 20 77 68 69 63 68 0a | 61 72 65 20 6d 6f 64 69 |s which.|are modi|
|00003930| 66 69 65 64 20 77 69 74 | 68 20 74 68 65 0a 58 2e |fied wit|h the.X.|
|00003940| 49 20 73 65 74 0a 61 6e | 64 0a 58 2e 49 20 75 6e |I set.an|d.X.I un|
|00003950| 73 65 74 0a 63 6f 6d 6d | 61 6e 64 73 2c 20 61 6e |set.comm|ands, an|
|00003960| 64 20 6e 75 6d 65 72 69 | 63 20 76 61 72 69 61 62 |d numeri|c variab|
|00003970| 6c 65 73 20 77 68 69 63 | 68 20 61 72 65 20 6d 6f |les whic|h are mo|
|00003980| 64 69 66 69 65 64 20 77 | 69 74 68 20 74 68 65 0a |dified w|ith the.|
|00003990| 58 2e 49 20 6e 73 65 74 | 0a 61 6e 64 0a 58 2e 49 |X.I nset|.and.X.I|
|000039a0| 20 75 6e 73 65 74 0a 63 | 6f 6d 6d 61 6e 64 73 2e | unset.c|ommands.|
|000039b0| 0a 58 0a 53 74 72 69 6e | 67 20 76 61 72 69 61 62 |.X.Strin|g variab|
|000039c0| 6c 65 73 20 61 72 65 20 | 6c 69 73 74 73 20 6f 66 |les are |lists of|
|000039d0| 20 31 20 6f 72 20 6d 6f | 72 65 20 76 61 72 69 61 | 1 or mo|re varia|
|000039e0| 62 6c 65 20 6c 65 6e 67 | 74 68 20 77 6f 72 64 73 |ble leng|th words|
|000039f0| 2c 20 77 68 69 6c 65 20 | 6e 75 6c 6c 0a 76 61 72 |, while |null.var|
|00003a00| 69 61 62 6c 65 73 20 63 | 6f 6e 74 61 69 6e 20 6e |iables c|ontain n|
|00003a10| 6f 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2c 20 61 |o inform|ation, a|
|00003a20| 6e 64 20 66 69 6e 61 6c | 6c 79 2c 20 6e 75 6d 65 |nd final|ly, nume|
|00003a30| 72 69 63 20 76 61 72 69 | 61 62 6c 65 73 20 61 72 |ric vari|ables ar|
|00003a40| 65 20 6c 6f 6e 67 0a 69 | 6e 74 65 67 65 72 73 20 |e long.i|ntegers |
|00003a50| 77 69 74 68 20 61 20 73 | 69 6e 67 6c 65 20 76 61 |with a s|ingle va|
|00003a60| 6c 75 65 2e 20 4e 75 6c | 6c 20 76 61 72 69 61 62 |lue. Nul|l variab|
|00003a70| 6c 65 73 20 61 72 65 20 | 75 73 75 61 6c 6c 79 20 |les are |usually |
|00003a80| 75 73 65 64 20 66 6f 72 | 20 74 72 75 65 2f 66 61 |used for| true/fa|
|00003a90| 6c 73 65 0a 63 6f 6e 64 | 69 74 69 6f 6e 73 20 77 |lse.cond|itions w|
|00003aa0| 68 65 72 65 20 74 68 65 | 69 72 20 65 78 69 73 74 |here the|ir exist|
|00003ab0| 65 6e 63 65 2c 20 6f 72 | 20 6c 61 63 6b 20 74 68 |ence, or| lack th|
|00003ac0| 65 72 65 6f 66 2c 20 73 | 69 67 6e 69 66 69 65 73 |ereof, s|ignifies|
|00003ad0| 20 74 68 65 69 72 20 76 | 61 6c 75 65 2e 0a 58 0a | their v|alue..X.|
|00003ae0| 41 66 74 65 72 20 61 6c | 69 61 73 20 70 61 72 73 |After al|ias pars|
|00003af0| 69 6e 67 2c 20 76 61 72 | 69 61 62 6c 65 20 70 61 |ing, var|iable pa|
|00003b00| 72 73 69 6e 67 20 69 73 | 20 70 65 72 66 6f 72 6d |rsing is| perform|
|00003b10| 65 64 2e 20 20 4c 69 6b | 65 20 74 68 65 20 73 77 |ed. Lik|e the sw|
|00003b20| 69 74 63 68 65 73 20 69 | 6e 0a 61 6c 69 61 73 65 |itches i|n.aliase|
|00003b30| 73 2c 20 76 61 72 69 61 | 62 6c 65 73 20 61 72 65 |s, varia|bles are|
|00003b40| 20 70 72 65 66 69 78 65 | 64 20 77 69 74 68 20 74 | prefixe|d with t|
|00003b50| 68 65 20 60 24 27 20 6f | 72 20 60 24 24 27 20 66 |he `$' o|r `$$' f|
|00003b60| 6f 72 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 0a 76 |or envir|onment.v|
|00003b70| 61 72 69 61 62 6c 65 73 | 2c 20 74 6f 20 73 69 67 |ariables|, to sig|
|00003b80| 6e 69 66 79 20 74 68 61 | 74 20 74 68 65 20 76 61 |nify tha|t the va|
|00003b90| 6c 75 65 20 6f 66 20 74 | 68 65 20 76 61 72 69 61 |lue of t|he varia|
|00003ba0| 62 6c 65 20 62 65 69 6e | 67 20 6e 61 6d 65 64 20 |ble bein|g named |
|00003bb0| 69 73 20 74 6f 20 62 65 | 0a 73 75 62 73 74 69 74 |is to be|.substit|
|00003bc0| 75 74 65 64 20 68 65 72 | 65 2e 20 20 54 68 69 73 |uted her|e. This|
|00003bd0| 20 73 75 62 73 74 69 74 | 75 74 69 6f 6e 20 69 73 | substit|ution is|
|00003be0| 20 72 65 63 75 72 73 69 | 76 65 20 61 6e 64 20 76 | recursi|ve and v|
|00003bf0| 61 72 69 61 62 6c 65 73 | 20 65 6d 62 65 64 64 65 |ariables| embedde|
|00003c00| 64 20 69 6e 0a 77 6f 72 | 64 73 20 70 72 6f 64 75 |d in.wor|ds produ|
|00003c10| 63 65 20 65 76 65 72 79 | 20 70 6f 73 73 69 62 6c |ce every| possibl|
|00003c20| 65 20 63 6f 6d 62 69 6e | 61 74 69 6f 6e 2e 20 45 |e combin|ation. E|
|00003c30| 78 61 6d 70 6c 65 3a 0a | 58 0a 58 2e 62 72 0a 58 |xample:.|X.X.br.X|
|00003c40| 3e 20 73 65 74 20 76 61 | 72 20 3d 20 61 61 20 62 |> set va|r = aa b|
|00003c50| 62 20 63 63 0a 58 2e 62 | 72 0a 58 3e 20 6c 73 20 |b cc.X.b|r.X> ls |
|00003c60| 7e 24 76 61 72 09 23 20 | 77 69 6c 6c 20 79 69 65 |~$var.# |will yie|
|00003c70| 6c 64 3a 0a 58 2e 62 72 | 0a 58 3e 20 6c 73 20 7e |ld:.X.br|.X> ls ~|
|00003c80| 61 61 20 7e 62 62 20 7e | 63 63 0a 58 0a 49 6e 64 |aa ~bb ~|cc.X.Ind|
|00003c90| 69 76 69 64 75 61 6c 20 | 77 6f 72 64 73 20 69 6e |ividual |words in|
|00003ca0| 20 61 20 73 74 72 69 6e | 67 20 76 61 72 69 61 62 | a strin|g variab|
|00003cb0| 6c 65 20 6d 61 79 20 62 | 65 20 73 75 62 73 74 69 |le may b|e substi|
|00003cc0| 74 75 74 65 64 20 62 79 | 20 70 6c 61 63 69 6e 67 |tuted by| placing|
|00003cd0| 20 61 6e 0a 65 78 70 72 | 65 73 73 69 6f 6e 20 69 | an.expr|ession i|
|00003ce0| 6e 20 60 5b 27 20 61 6e | 64 20 60 5d 27 20 66 6f |n `[' an|d `]' fo|
|00003cf0| 6c 6c 6f 77 69 6e 67 20 | 74 68 65 20 6e 61 6d 65 |llowing |the name|
|00003d00| 20 6f 66 20 74 68 65 20 | 76 61 72 69 61 62 6c 65 | of the |variable|
|00003d10| 2e 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 3a 0a 58 |. For ex|ample:.X|
|00003d20| 0a 58 2e 62 72 0a 58 3e | 20 73 65 74 20 76 61 72 |.X.br.X>| set var|
|00003d30| 20 3d 20 61 61 20 62 62 | 20 63 63 0a 58 2e 62 72 | = aa bb| cc.X.br|
|00003d40| 0a 58 3e 20 6c 73 20 7e | 24 76 61 72 5b 31 5d 09 |.X> ls ~|$var[1].|
|00003d50| 23 20 77 69 6c 6c 20 79 | 69 65 6c 64 3a 0a 58 2e |# will y|ield:.X.|
|00003d60| 62 72 0a 58 3e 20 6c 73 | 20 7e 62 62 0a 58 0a 56 |br.X> ls| ~bb.X.V|
|00003d70| 61 72 69 61 62 6c 65 20 | 6e 61 6d 65 73 20 6d 61 |ariable |names ma|
|00003d80| 79 20 62 65 20 65 6e 63 | 6c 6f 73 65 64 20 69 6e |y be enc|losed in|
|00003d90| 20 60 7b 27 20 61 6e 64 | 20 60 7d 27 20 74 6f 20 | `{' and| `}' to |
|00003da0| 73 65 70 61 72 61 74 65 | 20 74 68 65 6d 20 66 72 |separate| them fr|
|00003db0| 6f 6d 20 6f 74 68 65 72 | 0a 6c 65 74 74 65 72 73 |om other|.letters|
|00003dc0| 20 73 6f 20 74 68 61 74 | 20 74 68 65 79 20 6d 61 | so that| they ma|
|00003dd0| 79 20 62 65 20 65 6d 62 | 65 64 64 65 64 20 69 6e |y be emb|edded in|
|00003de0| 20 61 20 77 6f 72 64 2e | 20 45 78 61 6d 70 6c 65 | a word.| Example|
|00003df0| 3a 0a 58 2e 62 72 0a 58 | 0a 58 09 2f 75 73 72 2f |:.X.br.X|.X./usr/|
|00003e00| 74 6d 70 2f 24 7b 66 69 | 6c 65 7d 65 78 74 09 22 |tmp/${fi|le}ext."|
|00003e10| 24 24 7b 55 53 45 52 7d | 58 58 58 58 22 0a 58 2e |$${USER}|XXXX".X.|
|00003e20| 62 72 0a 58 0a 50 72 65 | 66 69 78 69 6e 67 20 61 |br.X.Pre|fixing a|
|00003e30| 20 76 61 72 69 61 62 6c | 65 20 6e 61 6d 65 20 77 | variabl|e name w|
|00003e40| 69 74 68 20 60 24 23 27 | 20 6f 72 20 60 24 24 23 |ith `$#'| or `$$#|
|00003e50| 27 20 66 6f 72 20 65 6e | 76 69 72 6f 6e 6d 65 6e |' for en|vironmen|
|00003e60| 74 20 76 61 72 69 61 62 | 6c 65 73 2c 0a 72 65 74 |t variab|les,.ret|
|00003e70| 75 72 6e 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |urns the| number |
|00003e80| 6f 66 20 77 6f 72 64 73 | 20 63 6f 6e 74 61 69 6e |of words| contain|
|00003e90| 65 64 20 69 6e 20 61 20 | 73 74 72 69 6e 67 20 76 |ed in a |string v|
|00003ea0| 61 72 69 61 62 6c 65 20 | 6f 72 20 74 68 65 20 6e |ariable |or the n|
|00003eb0| 75 6d 62 65 72 20 6f 66 | 0a 6c 65 74 74 65 72 73 |umber of|.letters|
|00003ec0| 20 69 6e 20 61 6e 20 69 | 6e 64 69 76 69 64 75 61 | in an i|ndividua|
|00003ed0| 6c 20 77 6f 72 64 2e 20 | 50 72 65 66 69 78 69 6e |l word. |Prefixin|
|00003ee0| 67 20 61 20 76 61 72 69 | 61 62 6c 65 20 77 69 74 |g a vari|able wit|
|00003ef0| 68 20 60 24 3f 27 20 6f | 72 20 60 24 24 3f 27 20 |h `$?' o|r `$$?' |
|00003f00| 66 6f 72 0a 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |for.envi|ronment |
|00003f10| 76 61 72 69 61 62 6c 65 | 73 2c 20 72 65 74 75 72 |variable|s, retur|
|00003f20| 6e 73 20 74 68 65 20 74 | 79 70 65 20 6f 66 20 76 |ns the t|ype of v|
|00003f30| 61 72 69 61 62 6c 65 20 | 6f 72 20 30 20 69 66 20 |ariable |or 0 if |
|00003f40| 69 74 20 69 73 20 6e 6f | 74 0a 64 65 66 69 6e 65 |it is no|t.define|
|00003f50| 64 2e 20 45 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 76 |d. Envir|onment v|
|00003f60| 61 72 69 61 62 6c 65 73 | 20 61 72 65 20 63 6f 6e |ariables| are con|
|00003f70| 73 69 64 65 72 65 64 20 | 73 74 72 69 6e 67 20 76 |sidered |string v|
|00003f80| 61 72 69 61 62 6c 65 73 | 20 61 6c 77 61 79 73 2e |ariables| always.|
|00003f90| 20 54 68 65 0a 76 61 6c | 69 64 20 74 79 70 65 73 | The.val|id types|
|00003fa0| 20 61 72 65 3a 0a 58 0a | 58 2e 62 72 0a 58 09 30 | are:.X.|X.br.X.0|
|00003fb0| 20 20 20 4e 6f 74 20 64 | 65 66 69 6e 65 64 0a 58 | Not d|efined.X|
|00003fc0| 2e 62 72 0a 58 09 31 20 | 20 20 53 74 72 69 6e 67 |.br.X.1 | String|
|00003fd0| 20 76 61 72 69 61 62 6c | 65 0a 58 2e 62 72 0a 58 | variabl|e.X.br.X|
|00003fe0| 09 32 20 20 20 4e 75 6d | 65 72 69 63 20 76 61 72 |.2 Num|eric var|
|00003ff0| 69 61 62 6c 65 0a 58 2e | 62 72 0a 58 09 33 20 20 |iable.X.|br.X.3 |
|00004000| 20 4e 75 6c 6c 20 76 61 | 72 69 61 62 6c 65 0a 58 | Null va|riable.X|
|00004010| 2e 62 72 0a 58 0a 54 68 | 65 20 6d 65 74 61 63 68 |.br.X.Th|e metach|
|00004020| 61 72 61 63 74 65 72 20 | 60 24 3c 27 20 72 65 61 |aracter |`$<' rea|
|00004030| 64 73 20 69 6e 20 61 20 | 6c 69 6e 65 20 6f 66 20 |ds in a |line of |
|00004040| 74 65 78 74 20 66 72 6f | 6d 20 74 68 65 0a 58 2e |text fro|m the.X.|
|00004050| 49 20 73 74 64 69 6e 0a | 61 6e 64 20 72 65 70 6c |I stdin.|and repl|
|00004060| 61 63 65 73 20 69 74 73 | 65 6c 66 20 77 69 74 68 |aces its|elf with|
|00004070| 20 74 68 65 20 69 6e 70 | 75 74 20 72 65 61 64 2e | the inp|ut read.|
|00004080| 0a 58 0a 58 2e 53 48 20 | 4c 4f 47 49 43 41 4c 20 |.X.X.SH |LOGICAL |
|00004090| 41 53 53 49 47 4e 4d 45 | 4e 54 20 53 55 42 53 54 |ASSIGNME|NT SUBST|
|000040a0| 49 54 55 54 49 4f 4e 0a | 58 0a 54 68 65 20 73 68 |ITUTION.|X.The sh|
|000040b0| 65 6c 6c 20 6d 61 69 6e | 74 61 69 6e 73 20 61 20 |ell main|tains a |
|000040c0| 6c 69 73 74 20 6f 66 20 | 61 73 73 69 67 6e 6d 65 |list of |assignme|
|000040d0| 6e 74 73 20 74 68 61 74 | 20 63 61 6e 20 62 65 20 |nts that| can be |
|000040e0| 75 73 65 64 20 74 6f 20 | 72 65 66 65 72 65 6e 63 |used to |referenc|
|000040f0| 65 0a 66 69 6c 65 20 61 | 6e 64 20 64 69 72 65 63 |e.file a|nd direc|
|00004100| 74 6f 72 79 20 70 72 65 | 66 69 78 65 73 20 77 69 |tory pre|fixes wi|
|00004110| 74 68 20 61 20 6d 69 6e | 69 6d 61 6c 20 61 6d 6f |th a min|imal amo|
|00004120| 75 6e 74 20 6f 66 20 74 | 79 70 69 6e 67 2e 20 41 |unt of t|yping. A|
|00004130| 73 73 69 67 6e 6d 65 6e | 74 73 0a 61 72 65 20 64 |ssignmen|ts.are d|
|00004140| 65 66 69 6e 65 64 20 61 | 6e 64 20 75 6e 64 65 66 |efined a|nd undef|
|00004150| 69 6e 65 64 20 75 73 69 | 6e 67 20 74 68 65 20 63 |ined usi|ng the c|
|00004160| 6f 6d 6d 61 6e 64 73 0a | 58 2e 49 20 61 73 73 69 |ommands.|X.I assi|
|00004170| 67 6e 0a 61 6e 64 0a 58 | 2e 49 20 75 6e 61 73 73 |gn.and.X|.I unass|
|00004180| 69 67 6e 2e 0a 4c 6f 67 | 69 63 61 6c 20 61 73 73 |ign..Log|ical ass|
|00004190| 69 67 6e 6d 65 6e 74 73 | 20 61 72 65 20 70 6c 61 |ignments| are pla|
|000041a0| 63 65 64 20 61 74 20 74 | 68 65 20 62 65 67 69 6e |ced at t|he begin|
|000041b0| 6e 69 6e 67 20 6f 66 20 | 74 68 65 20 77 6f 72 64 |ning of |the word|
|000041c0| 2c 20 66 6f 6c 6c 6f 77 | 65 64 20 62 79 20 61 0a |, follow|ed by a.|
|000041d0| 58 60 3a 27 2c 20 74 68 | 65 6e 20 70 6f 73 73 69 |X`:', th|en possi|
|000041e0| 62 6c 79 20 66 6f 6c 6c | 6f 77 65 64 20 62 79 20 |bly foll|owed by |
|000041f0| 6d 6f 72 65 20 70 61 74 | 68 20 63 6f 6d 70 6f 6e |more pat|h compon|
|00004200| 65 6e 74 73 20 6f 72 20 | 66 69 6c 65 6e 61 6d 65 |ents or |filename|
|00004210| 73 2e 20 4c 6f 67 69 63 | 61 6c 0a 61 73 73 69 67 |s. Logic|al.assig|
|00004220| 6e 6d 65 6e 74 20 73 75 | 62 73 74 69 74 75 74 69 |nment su|bstituti|
|00004230| 6f 6e 73 20 74 61 6b 65 | 20 70 6c 61 63 65 20 62 |ons take| place b|
|00004240| 65 66 6f 72 65 20 77 69 | 6c 64 63 61 72 64 20 73 |efore wi|ldcard s|
|00004250| 75 62 73 74 69 74 75 74 | 69 6f 6e 2c 20 73 6f 0a |ubstitut|ion, so.|
|00004260| 77 69 6c 64 63 61 72 64 | 73 20 6d 61 79 20 62 65 |wildcard|s may be|
|00004270| 20 70 6c 61 63 65 64 20 | 69 6e 20 74 68 65 20 61 | placed |in the a|
|00004280| 73 73 69 67 6e 6d 65 6e | 74 20 74 6f 20 6d 61 6b |ssignmen|t to mak|
|00004290| 65 20 63 6f 6e 64 69 74 | 69 6f 6e 61 6c 20 61 73 |e condit|ional as|
|000042a0| 73 69 67 6e 6d 65 6e 74 | 73 2e 0a 58 45 78 61 6d |signment|s..XExam|
|000042b0| 70 6c 65 73 3a 0a 58 0a | 58 2e 62 72 0a 58 3e 20 |ples:.X.|X.br.X> |
|000042c0| 61 73 73 69 67 6e 20 69 | 6e 63 20 22 7b 7b 2f 75 |assign i|nc "{{/u|
|000042d0| 73 72 2f 69 6e 63 6c 75 | 64 65 2c 2f 75 73 72 2f |sr/inclu|de,/usr/|
|000042e0| 69 6e 63 6c 75 64 65 2f | 73 79 73 7d 7d 2f 22 0a |include/|sys}}/".|
|000042f0| 58 2e 62 72 0a 58 3e 20 | 6d 6f 72 65 20 69 6e 63 |X.br.X> |more inc|
|00004300| 3a 69 6f 63 74 6c 2e 68 | 09 09 23 20 57 69 6c 6c |:ioctl.h|..# Will|
|00004310| 20 79 69 65 6c 64 3a 0a | 58 2e 62 72 0a 58 20 20 | yield:.|X.br.X |
|00004320| 6d 6f 72 65 20 7b 7b 2f | 75 73 72 2f 69 6e 63 6c |more {{/|usr/incl|
|00004330| 75 64 65 2c 2f 75 73 72 | 2f 69 6e 63 6c 75 64 65 |ude,/usr|/include|
|00004340| 2f 73 79 73 7d 7d 2f 69 | 6f 63 74 6c 2e 68 0a 58 |/sys}}/i|octl.h.X|
|00004350| 2e 62 72 0a 58 20 20 23 | 20 54 6f 20 66 69 6e 61 |.br.X #| To fina|
|00004360| 6c 6c 79 20 79 69 65 6c | 64 20 61 66 74 65 72 20 |lly yiel|d after |
|00004370| 77 69 6c 64 63 61 72 64 | 20 73 75 62 73 74 69 74 |wildcard| substit|
|00004380| 75 74 69 6f 6e 3a 0a 58 | 2e 62 72 0a 58 20 20 6d |ution:.X|.br.X m|
|00004390| 6f 72 65 20 2f 75 73 72 | 2f 69 6e 63 6c 75 64 65 |ore /usr|/include|
|000043a0| 2f 73 79 73 2f 69 6f 63 | 74 6c 2e 68 0a 58 0a 4f |/sys/ioc|tl.h.X.O|
|000043b0| 62 76 69 6f 75 73 6c 79 | 20 66 69 6c 65 73 20 61 |bviously| files a|
|000043c0| 6e 64 20 64 69 72 65 63 | 74 6f 72 79 20 70 61 74 |nd direc|tory pat|
|000043d0| 68 73 20 61 72 65 20 6e | 6f 74 20 74 68 65 20 6f |hs are n|ot the o|
|000043e0| 6e 6c 79 20 70 6f 73 73 | 69 62 6c 65 20 75 73 65 |nly poss|ible use|
|000043f0| 20 66 6f 72 0a 6c 6f 67 | 69 63 61 6c 20 61 73 73 | for.log|ical ass|
|00004400| 69 67 6e 6d 65 6e 74 73 | 2e 20 20 41 73 73 69 67 |ignments|. Assig|
|00004410| 6e 6d 65 6e 74 20 70 72 | 6f 63 65 73 73 69 6e 67 |nment pr|ocessing|
|00004420| 20 63 61 6e 20 62 65 20 | 63 69 72 63 75 6d 76 65 | can be |circumve|
|00004430| 6e 74 65 64 20 62 79 20 | 73 65 74 74 69 6e 67 0a |nted by |setting.|
|00004440| 74 68 65 20 73 68 65 6c | 6c 20 76 61 72 69 61 62 |the shel|l variab|
|00004450| 6c 65 0a 58 2e 49 20 6e | 6f 61 73 73 69 67 6e 73 |le.X.I n|oassigns|
|00004460| 2e 0a 58 0a 58 2e 53 48 | 20 57 49 4c 44 43 41 52 |..X.X.SH| WILDCAR|
|00004470| 44 20 53 55 42 53 54 49 | 54 55 54 49 4f 4e 0a 58 |D SUBSTI|TUTION.X|
|00004480| 0a 41 6e 79 20 77 6f 72 | 64 20 63 6f 6e 74 61 69 |.Any wor|d contai|
|00004490| 6e 69 6e 67 20 74 68 65 | 20 63 68 61 72 61 63 74 |ning the| charact|
|000044a0| 65 72 73 20 60 2a 27 2c | 20 60 3f 27 2c 20 60 5b |ers `*',| `?', `[|
|000044b0| 27 2c 20 60 7b 27 20 6f | 72 20 62 65 67 69 6e 73 |', `{' o|r begins|
|000044c0| 20 77 69 74 68 20 60 7e | 27 0a 69 73 20 63 6f 6e | with `~|'.is con|
|000044d0| 73 69 64 65 72 65 64 20 | 61 20 63 61 6e 64 69 64 |sidered |a candid|
|000044e0| 61 74 65 20 66 6f 72 20 | 77 69 6c 64 63 61 72 64 |ate for |wildcard|
|000044f0| 20 65 78 70 61 6e 73 69 | 6f 6e 2c 20 70 72 6f 76 | expansi|on, prov|
|00004500| 69 64 65 64 20 74 68 61 | 74 20 74 68 65 20 73 68 |ided tha|t the sh|
|00004510| 65 6c 6c 0a 76 61 72 69 | 61 62 6c 65 0a 58 2e 49 |ell.vari|able.X.I|
|00004520| 20 6e 6f 67 6c 6f 62 0a | 64 6f 65 73 20 6e 6f 74 | noglob.|does not|
|00004530| 20 65 78 69 73 74 2e 20 | 54 68 65 20 77 6f 72 64 | exist. |The word|
|00004540| 20 69 73 20 74 68 65 6e | 20 70 61 72 73 65 64 20 | is then| parsed |
|00004550| 61 6e 64 20 74 68 65 20 | 66 69 6c 65 20 73 79 73 |and the |file sys|
|00004560| 74 65 6d 20 69 73 20 65 | 78 61 6d 69 6e 65 64 20 |tem is e|xamined |
|00004570| 74 6f 0a 66 69 6e 64 20 | 66 69 6c 65 73 20 74 68 |to.find |files th|
|00004580| 61 74 20 6d 61 74 63 68 | 20 74 68 65 20 70 61 74 |at match| the pat|
|00004590| 74 65 72 6e 2e 20 49 66 | 20 6d 61 74 63 68 65 73 |tern. If| matches|
|000045a0| 20 61 72 65 20 66 6f 75 | 6e 64 20 74 68 65 6e 20 | are fou|nd then |
|000045b0| 74 68 65 20 77 69 6c 64 | 63 61 72 64 0a 70 61 74 |the wild|card.pat|
|000045c0| 74 65 72 6e 20 69 73 20 | 72 65 70 6c 61 63 65 64 |tern is |replaced|
|000045d0| 20 6f 6e 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 | on the |command |
|000045e0| 6c 69 6e 65 20 77 69 74 | 68 20 61 20 73 6f 72 74 |line wit|h a sort|
|000045f0| 65 64 20 6c 69 73 74 20 | 6f 66 20 66 69 6c 65 6e |ed list |of filen|
|00004600| 61 6d 65 73 0a 74 68 61 | 74 20 6d 61 74 63 68 65 |ames.tha|t matche|
|00004610| 64 20 74 68 65 20 70 61 | 74 74 65 72 6e 2e 20 20 |d the pa|ttern. |
|00004620| 49 66 20 74 68 65 20 70 | 61 74 74 65 72 6e 20 6d |If the p|attern m|
|00004630| 61 74 63 68 65 72 20 66 | 61 69 6c 73 20 74 6f 20 |atcher f|ails to |
|00004640| 66 69 6e 64 20 61 20 76 | 61 6c 69 64 0a 6d 61 74 |find a v|alid.mat|
|00004650| 63 68 20 74 68 65 6e 20 | 69 74 20 70 72 69 6e 74 |ch then |it print|
|00004660| 73 20 61 6e 20 65 72 72 | 6f 72 20 61 6e 64 20 74 |s an err|or and t|
|00004670| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 69 73 20 61 62 |he comma|nd is ab|
|00004680| 6f 72 74 65 64 2c 20 75 | 6e 6c 65 73 73 20 74 68 |orted, u|nless th|
|00004690| 65 20 73 68 65 6c 6c 0a | 76 61 72 69 61 62 6c 65 |e shell.|variable|
|000046a0| 0a 58 2e 49 20 6e 6f 6e | 6f 6d 61 74 63 68 0a 69 |.X.I non|omatch.i|
|000046b0| 73 20 73 65 74 2c 20 69 | 6e 20 77 68 69 63 68 20 |s set, i|n which |
|000046c0| 63 61 73 65 20 69 74 20 | 69 73 20 6e 6f 74 20 61 |case it |is not a|
|000046d0| 6e 20 65 72 72 6f 72 20 | 61 6e 64 20 74 68 65 20 |n error |and the |
|000046e0| 6f 72 69 67 69 6e 61 6c | 20 70 61 74 74 65 72 6e |original| pattern|
|000046f0| 20 69 73 20 6c 65 66 74 | 0a 6f 6e 20 74 68 65 20 | is left|.on the |
|00004700| 63 6f 6d 6d 61 6e 64 20 | 6c 69 6e 65 2e 0a 58 0a |command |line..X.|
|00004710| 48 69 64 64 65 6e 20 66 | 69 6c 65 73 20 28 74 68 |Hidden f|iles (th|
|00004720| 6f 73 65 20 62 65 67 69 | 6e 6e 69 6e 67 20 77 69 |ose begi|nning wi|
|00004730| 74 68 20 61 20 70 65 72 | 69 6f 64 20 60 2e 27 29 |th a per|iod `.')|
|00004740| 20 61 72 65 20 61 6c 73 | 6f 20 69 6e 63 6c 75 64 | are als|o includ|
|00004750| 65 64 20 69 6e 0a 77 69 | 6c 64 63 61 72 64 20 73 |ed in.wi|ldcard s|
|00004760| 65 61 72 63 68 65 73 20 | 75 6e 6c 65 73 73 20 74 |earches |unless t|
|00004770| 68 65 0a 58 2e 49 20 6e | 6f 64 6f 74 73 0a 73 68 |he.X.I n|odots.sh|
|00004780| 65 6c 6c 20 76 61 72 69 | 61 62 6c 65 20 69 73 20 |ell vari|able is |
|00004790| 73 65 74 2c 20 69 6e 20 | 77 68 69 63 68 20 63 61 |set, in |which ca|
|000047a0| 73 65 20 74 68 65 79 20 | 61 72 65 20 69 67 6e 6f |se they |are igno|
|000047b0| 72 65 64 20 75 6e 6c 65 | 73 73 20 65 78 70 6c 69 |red unle|ss expli|
|000047c0| 63 69 74 6c 79 0a 73 70 | 65 63 69 66 69 65 64 2e |citly.sp|ecified.|
|000047d0| 20 54 68 65 20 66 69 6c | 65 20 73 79 73 74 65 6d | The fil|e system|
|000047e0| 20 63 6f 6e 73 74 72 75 | 63 74 73 20 60 2e 27 20 | constru|cts `.' |
|000047f0| 28 63 75 72 72 65 6e 74 | 20 64 69 72 65 63 74 6f |(current| directo|
|00004800| 72 79 29 20 61 6e 64 20 | 60 2e 2e 27 0a 58 28 70 |ry) and |`..'.X(p|
|00004810| 72 65 76 69 6f 75 73 20 | 64 69 72 65 63 74 6f 72 |revious |director|
|00004820| 79 29 20 61 72 65 20 61 | 6c 77 61 79 73 20 69 67 |y) are a|lways ig|
|00004830| 6e 6f 72 65 64 20 66 6f | 72 20 70 75 72 70 6f 73 |nored fo|r purpos|
|00004840| 65 73 20 6f 66 20 77 69 | 6c 64 63 61 72 64 20 73 |es of wi|ldcard s|
|00004850| 65 61 72 63 68 65 73 2e | 0a 58 0a 54 68 65 20 76 |earches.|.X.The v|
|00004860| 61 72 69 6f 75 73 20 77 | 69 6c 64 63 61 72 64 20 |arious w|ildcard |
|00004870| 63 68 61 72 61 63 74 65 | 72 73 20 68 61 76 65 20 |characte|rs have |
|00004880| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 6d 65 |the foll|owing me|
|00004890| 61 6e 69 6e 67 73 3a 0a | 58 2e 54 50 0a 58 2e 42 |anings:.|X.TP.X.B|
|000048a0| 20 7e 0a 58 46 6f 6c 6c | 6f 77 65 64 20 62 79 20 | ~.XFoll|owed by |
|000048b0| 61 20 75 73 65 72 20 6e | 61 6d 65 20 65 78 70 61 |a user n|ame expa|
|000048c0| 6e 64 73 20 74 6f 20 74 | 68 65 20 66 75 6c 6c 20 |nds to t|he full |
|000048d0| 70 61 74 68 20 6f 66 20 | 74 68 61 74 20 75 73 65 |path of |that use|
|000048e0| 72 73 20 68 6f 6d 65 0a | 64 69 72 65 63 74 6f 72 |rs home.|director|
|000048f0| 79 2e 20 60 7e 27 20 61 | 6c 6f 6e 65 20 65 78 70 |y. `~' a|lone exp|
|00004900| 61 6e 64 73 20 74 6f 20 | 74 68 65 20 73 68 65 6c |ands to |the shel|
|00004910| 6c 20 75 73 65 72 73 20 | 68 6f 6d 65 20 64 69 72 |l users |home dir|
|00004920| 65 63 74 6f 72 79 20 61 | 73 20 64 65 66 69 6e 65 |ectory a|s define|
|00004930| 64 0a 69 6e 20 74 68 65 | 20 73 68 65 6c 6c 20 76 |d.in the| shell v|
|00004940| 61 72 69 61 62 6c 65 0a | 58 2e 49 20 68 6f 6d 65 |ariable.|X.I home|
|00004950| 2e 0a 58 60 7e 27 20 66 | 6f 6c 6c 6f 77 65 64 20 |..X`~' f|ollowed |
|00004960| 62 79 20 61 20 77 69 6c | 64 63 61 72 64 20 65 78 |by a wil|dcard ex|
|00004970| 70 72 65 73 73 69 6f 6e | 20 73 65 61 72 63 68 65 |pression| searche|
|00004980| 73 20 74 68 65 20 70 61 | 73 73 77 64 20 66 69 6c |s the pa|sswd fil|
|00004990| 65 20 66 6f 72 20 70 6f | 73 73 69 62 6c 65 0a 75 |e for po|ssible.u|
|000049a0| 73 65 72 20 6e 61 6d 65 | 73 20 61 6e 64 20 72 65 |ser name|s and re|
|000049b0| 70 6c 61 63 65 73 20 74 | 68 65 6d 20 77 69 74 68 |places t|hem with|
|000049c0| 20 74 68 65 20 66 75 6c | 6c 20 70 61 74 68 20 74 | the ful|l path t|
|000049d0| 6f 20 74 68 65 69 72 20 | 68 6f 6d 65 20 64 69 72 |o their |home dir|
|000049e0| 65 63 74 6f 72 79 2e 0a | 58 2e 50 50 0a 58 2e 54 |ectory..|X.PP.X.T|
|000049f0| 50 0a 58 2e 42 20 2a 0a | 4d 61 74 63 68 65 73 20 |P.X.B *.|Matches |
|00004a00| 7a 65 72 6f 20 6f 72 20 | 6d 6f 72 65 20 63 68 61 |zero or |more cha|
|00004a10| 72 61 63 74 65 72 73 2e | 0a 58 2e 50 50 0a 58 2e |racters.|.X.PP.X.|
|00004a20| 54 50 0a 58 2e 42 20 3f | 0a 4d 61 74 63 68 65 73 |TP.X.B ?|.Matches|
|00004a30| 20 61 6e 79 20 73 69 6e | 67 6c 65 20 63 68 61 72 | any sin|gle char|
|00004a40| 61 63 74 65 72 2e 0a 58 | 2e 50 50 0a 58 2e 54 50 |acter..X|.PP.X.TP|
|00004a50| 0a 58 2e 42 20 5b 2e 2e | 2e 5d 0a 4d 61 74 63 68 |.X.B [..|.].Match|
|00004a60| 65 73 20 74 6f 20 61 6e | 79 20 73 69 6e 67 6c 65 |es to an|y single|
|00004a70| 20 63 68 61 72 61 63 74 | 65 72 20 74 68 61 74 20 | charact|er that |
|00004a80| 69 73 20 70 72 65 73 65 | 6e 74 20 69 6e 73 69 64 |is prese|nt insid|
|00004a90| 65 20 6f 66 20 74 68 65 | 20 5b 5d 27 73 2e 0a 41 |e of the| []'s..A|
|00004aa0| 20 60 2d 27 20 69 6e 20 | 62 65 74 77 65 65 6e 20 | `-' in |between |
|00004ab0| 63 68 61 72 61 63 74 65 | 72 73 20 64 65 6e 6f 74 |characte|rs denot|
|00004ac0| 65 73 20 61 20 72 61 6e | 67 65 20 6f 66 20 63 68 |es a ran|ge of ch|
|00004ad0| 61 72 61 63 74 65 72 73 | 2c 20 77 68 65 72 65 20 |aracters|, where |
|00004ae0| 61 6e 79 20 73 69 6e 67 | 6c 65 0a 63 68 61 72 61 |any sing|le.chara|
|00004af0| 63 74 65 72 20 69 6e 20 | 74 68 65 20 72 61 6e 67 |cter in |the rang|
|00004b00| 65 20 69 73 20 6d 61 74 | 63 68 65 64 2e 0a 58 2e |e is mat|ched..X.|
|00004b10| 50 50 0a 58 2e 54 50 0a | 58 2e 42 20 5b 5e 2e 2e |PP.X.TP.|X.B [^..|
|00004b20| 2e 5d 0a 4d 61 74 63 68 | 65 73 20 74 6f 20 61 6e |.].Match|es to an|
|00004b30| 79 20 73 69 6e 67 6c 65 | 20 63 68 61 72 61 63 74 |y single| charact|
|00004b40| 65 72 20 74 68 61 74 20 | 69 73 20 6e 6f 74 20 70 |er that |is not p|
|00004b50| 72 65 73 65 6e 74 20 69 | 6e 73 69 64 65 20 6f 66 |resent i|nside of|
|00004b60| 20 74 68 65 0a 58 5b 5d | 27 73 2e 20 4a 75 73 74 | the.X[]|'s. Just|
|00004b70| 20 61 73 20 60 5b 2e 2e | 2e 5d 27 20 61 62 6f 76 | as `[..|.]' abov|
|00004b80| 65 2e 0a 58 2e 50 50 0a | 58 2e 54 50 0a 58 2e 42 |e..X.PP.|X.TP.X.B|
|00004b90| 20 7b 2e 2e 2e 7d 0a 43 | 6f 6d 6d 61 20 60 2c 27 | {...}.C|omma `,'|
|00004ba0| 2c 20 73 65 70 61 72 61 | 74 65 64 20 77 6f 72 64 |, separa|ted word|
|00004bb0| 73 20 61 72 65 20 61 75 | 74 6f 6d 61 74 69 63 61 |s are au|tomatica|
|00004bc0| 6c 6c 79 20 65 78 70 61 | 6e 64 65 64 20 28 6d 61 |lly expa|nded (ma|
|00004bd0| 63 72 6f 0a 65 78 70 61 | 6e 73 69 6f 6e 29 2e 20 |cro.expa|nsion). |
|00004be0| 57 6f 72 64 73 20 69 6e | 73 69 64 65 20 6f 66 20 |Words in|side of |
|00004bf0| 7b 7d 27 73 20 6d 61 79 | 20 62 65 20 64 69 72 65 |{}'s may| be dire|
|00004c00| 63 74 6f 72 69 65 73 20 | 6f 72 20 6d 6f 72 65 20 |ctories |or more |
|00004c10| 77 69 6c 64 63 61 72 64 | 0a 65 78 70 72 65 73 73 |wildcard|.express|
|00004c20| 69 6f 6e 73 2e 20 20 42 | 72 61 63 65 73 20 69 6e |ions. B|races in|
|00004c30| 73 69 64 65 20 6f 66 20 | 74 68 65 20 6f 75 74 65 |side of |the oute|
|00004c40| 72 6d 6f 73 74 20 6c 65 | 76 65 6c 20 6f 66 20 62 |rmost le|vel of b|
|00004c50| 72 61 63 65 73 20 62 65 | 63 6f 6d 65 73 0a 77 69 |races be|comes.wi|
|00004c60| 6c 64 63 61 72 64 20 65 | 78 70 61 6e 73 69 6f 6e |ldcard e|xpansion|
|00004c70| 20 61 6e 64 20 6f 6e 6c | 79 20 6d 61 74 63 68 65 | and onl|y matche|
|00004c80| 73 20 66 69 6c 65 73 20 | 74 68 61 74 20 65 78 69 |s files |that exi|
|00004c90| 73 74 2e 0a 58 2e 50 50 | 0a 58 2e 54 50 0a 58 2e |st..X.PP|.X.TP.X.|
|00004ca0| 42 20 7b 5e 2e 2e 2e 7d | 0a 4c 69 6b 65 20 60 7b |B {^...}|.Like `{|
|00004cb0| 2e 2e 2e 7d 27 2c 20 62 | 75 74 20 6d 61 74 63 68 |...}', b|ut match|
|00004cc0| 65 73 20 61 6e 79 74 68 | 69 6e 67 20 6e 6f 74 20 |es anyth|ing not |
|00004cd0| 63 6f 6e 74 61 69 6e 65 | 64 20 69 6e 20 74 68 65 |containe|d in the|
|00004ce0| 20 63 6f 6d 6d 61 20 73 | 65 70 61 72 61 74 65 64 | comma s|eparated|
|00004cf0| 0a 6c 69 73 74 2e 20 42 | 72 61 63 65 73 20 69 6e |.list. B|races in|
|00004d00| 73 69 64 65 20 74 68 65 | 20 6f 75 74 65 72 6d 6f |side the| outermo|
|00004d10| 73 74 20 6c 65 76 65 6c | 20 6f 66 20 62 72 61 63 |st level| of brac|
|00004d20| 65 73 20 62 65 63 6f 6d | 65 73 20 77 69 6c 64 63 |es becom|es wildc|
|00004d30| 61 72 64 0a 65 78 70 61 | 6e 73 69 6f 6e 20 6c 69 |ard.expa|nsion li|
|00004d40| 6b 65 20 61 62 6f 76 65 | 20 61 6e 64 20 6f 6e 6c |ke above| and onl|
|00004d50| 79 20 6d 61 74 63 68 20 | 66 69 6c 65 73 20 74 68 |y match |files th|
|00004d60| 61 74 20 61 72 65 20 6e | 6f 74 20 73 70 65 63 69 |at are n|ot speci|
|00004d70| 66 69 65 64 20 69 6e 20 | 74 68 65 0a 65 78 70 72 |fied in |the.expr|
|00004d80| 65 73 73 69 6f 6e 2e 0a | 58 2e 50 50 0a 58 0a 58 |ession..|X.PP.X.X|
|00004d90| 2e 53 48 20 52 45 44 49 | 52 45 43 54 49 4f 4e 0a |.SH REDI|RECTION.|
|00004da0| 58 0a 54 68 65 20 73 74 | 61 6e 64 61 72 64 20 69 |X.The st|andard i|
|00004db0| 6e 70 75 74 2c 20 73 74 | 61 6e 64 61 72 64 20 6f |nput, st|andard o|
|00004dc0| 75 74 70 75 74 20 61 6e | 64 20 73 74 61 6e 64 61 |utput an|d standa|
|00004dd0| 72 64 20 65 72 72 6f 72 | 20 6f 66 20 61 20 63 6f |rd error| of a co|
|00004de0| 6d 6d 61 6e 64 20 6d 61 | 79 20 62 65 0a 72 65 64 |mmand ma|y be.red|
|00004df0| 69 72 65 63 74 65 64 20 | 77 69 74 68 20 74 68 65 |irected |with the|
|00004e00| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 73 79 6e 74 61 | followi|ng synta|
|00004e10| 78 3a 0a 58 2e 62 72 0a | 58 2e 48 50 20 35 0a 58 |x:.X.br.|X.HP 5.X|
|00004e20| 5c 66 42 3c 5c 66 50 20 | 5c 66 49 6e 61 6d 65 5c |\fB<\fP |\fIname\|
|00004e30| 66 50 0a 58 2e 62 72 0a | 58 2e 6e 73 0a 4f 70 65 |fP.X.br.|X.ns.Ope|
|00004e40| 6e 20 74 68 65 20 66 69 | 6c 65 0a 58 2e 49 20 6e |n the fi|le.X.I n|
|00004e50| 61 6d 65 0a 61 73 20 74 | 68 65 20 63 6f 6d 6d 61 |ame.as t|he comma|
|00004e60| 6e 64 73 20 73 74 61 6e | 64 61 72 64 20 69 6e 70 |nds stan|dard inp|
|00004e70| 75 74 2e 0a 58 2e 50 50 | 0a 58 2e 48 50 20 35 0a |ut..X.PP|.X.HP 5.|
|00004e80| 58 5c 66 42 3c 25 5c 66 | 50 20 5c 66 49 64 65 73 |X\fB<%\f|P \fIdes|
|00004e90| 63 72 69 70 74 6f 72 5c | 66 50 0a 58 2e 62 72 0a |criptor\|fP.X.br.|
|00004ea0| 58 2e 6e 73 0a 4f 70 65 | 6e 73 20 74 68 65 20 66 |X.ns.Ope|ns the f|
|00004eb0| 69 6c 65 20 6f 72 20 70 | 69 70 65 20 72 65 66 65 |ile or p|ipe refe|
|00004ec0| 72 65 6e 63 65 64 20 62 | 79 0a 58 2e 49 20 64 65 |renced b|y.X.I de|
|00004ed0| 73 63 72 69 70 74 6f 72 | 0a 61 73 20 74 68 65 20 |scriptor|.as the |
|00004ee0| 63 6f 6d 6d 61 6e 64 73 | 20 73 74 61 6e 64 61 72 |commands| standar|
|00004ef0| 64 20 69 6e 70 75 74 2e | 20 20 49 66 20 74 68 65 |d input.| If the|
|00004f00| 20 64 65 73 63 72 69 70 | 74 6f 72 20 64 6f 65 73 | descrip|tor does|
|00004f10| 20 6e 6f 74 20 65 78 69 | 73 74 73 2c 20 61 20 70 | not exi|sts, a p|
|00004f20| 69 70 65 0a 69 73 20 61 | 75 74 6f 6d 61 74 69 63 |ipe.is a|utomatic|
|00004f30| 61 6c 6c 79 20 6d 61 64 | 65 2e 20 20 54 68 65 20 |ally mad|e. The |
|00004f40| 72 65 61 64 20 70 6f 72 | 74 69 6f 6e 20 6f 66 20 |read por|tion of |
|00004f50| 61 20 70 69 70 65 20 69 | 73 20 63 6c 6f 73 65 64 |a pipe i|s closed|
|00004f60| 20 61 74 20 74 68 65 20 | 73 68 65 6c 6c 0a 6c 65 | at the |shell.le|
|00004f70| 76 65 6c 2e 0a 58 2e 50 | 50 0a 58 2e 48 50 20 35 |vel..X.P|P.X.HP 5|
|00004f80| 0a 58 5c 66 42 3c 3c 25 | 5c 66 50 20 5c 66 49 64 |.X\fB<<%|\fP \fId|
|00004f90| 65 73 63 72 69 70 74 6f | 72 5c 66 50 0a 58 2e 62 |escripto|r\fP.X.b|
|00004fa0| 72 0a 58 2e 6e 73 0a 4f | 70 65 6e 73 20 74 68 65 |r.X.ns.O|pens the|
|00004fb0| 20 66 69 6c 65 20 6f 72 | 20 70 69 70 65 20 72 65 | file or| pipe re|
|00004fc0| 66 65 72 65 6e 63 65 64 | 20 62 79 0a 58 2e 49 20 |ferenced| by.X.I |
|00004fd0| 64 65 73 63 72 69 70 74 | 6f 72 0a 61 73 20 61 62 |descript|or.as ab|
|00004fe0| 6f 76 65 2c 20 62 75 74 | 20 74 68 65 20 72 65 61 |ove, but| the rea|
|00004ff0| 64 20 70 6f 72 74 69 6f | 6e 20 6f 66 20 61 20 70 |d portio|n of a p|
|00005000| 69 70 65 20 69 73 20 6c | 65 66 74 20 6f 70 65 6e |ipe is l|eft open|
|00005010| 20 61 74 20 74 68 65 20 | 73 68 65 6c 6c 20 6c 65 | at the |shell le|
|00005020| 76 65 6c 2e 0a 58 2e 50 | 50 0a 58 2e 48 50 20 35 |vel..X.P|P.X.HP 5|
|00005030| 0a 58 5c 66 42 3e 5c 66 | 50 20 5c 66 49 6e 61 6d |.X\fB>\f|P \fInam|
|00005040| 65 5c 66 50 0a 58 2e 62 | 72 0a 58 2e 6e 73 0a 58 |e\fP.X.b|r.X.ns.X|
|00005050| 2e 48 50 20 35 0a 58 5c | 66 42 3e 21 5c 66 50 20 |.HP 5.X\|fB>!\fP |
|00005060| 5c 66 49 6e 61 6d 65 5c | 66 50 0a 58 2e 62 72 0a |\fIname\|fP.X.br.|
|00005070| 58 2e 6e 73 0a 58 2e 48 | 50 20 35 0a 58 5c 66 42 |X.ns.X.H|P 5.X\fB|
|00005080| 3e 26 5c 66 50 20 5c 66 | 49 6e 61 6d 65 5c 66 50 |>&\fP \f|Iname\fP|
|00005090| 0a 58 2e 62 72 0a 58 2e | 6e 73 0a 54 68 65 20 63 |.X.br.X.|ns.The c|
|000050a0| 6f 6d 6d 61 6e 64 73 0a | 58 2e 49 20 73 74 64 6f |ommands.|X.I stdo|
|000050b0| 75 74 0a 58 60 3e 27 2c | 0a 58 2e 49 20 73 74 64 |ut.X`>',|.X.I std|
|000050c0| 65 72 72 0a 58 60 3e 21 | 27 20 6f 72 20 62 6f 74 |err.X`>!|' or bot|
|000050d0| 68 20 60 3e 26 27 20 77 | 69 6c 6c 20 62 65 20 72 |h `>&' w|ill be r|
|000050e0| 65 64 69 72 65 63 74 65 | 64 20 74 6f 20 74 68 65 |edirecte|d to the|
|000050f0| 20 6e 61 6d 65 64 20 66 | 69 6c 65 2c 20 6f 76 65 | named f|ile, ove|
|00005100| 72 77 72 69 74 69 6e 67 | 20 61 6e 79 0a 64 61 74 |rwriting| any.dat|
|00005110| 61 20 61 6e 64 20 63 72 | 65 61 74 69 6e 67 20 74 |a and cr|eating t|
|00005120| 68 65 20 66 69 6c 65 20 | 69 66 20 6e 65 63 65 73 |he file |if neces|
|00005130| 73 61 72 79 2e 20 20 49 | 66 20 74 68 65 20 73 68 |sary. I|f the sh|
|00005140| 65 6c 6c 20 76 61 72 69 | 61 62 6c 65 0a 58 2e 49 |ell vari|able.X.I|
|00005150| 20 6e 6f 63 6c 6f 62 62 | 65 72 0a 65 78 69 73 74 | noclobb|er.exist|
|00005160| 73 20 74 68 65 6e 20 74 | 68 65 20 66 69 6c 65 20 |s then t|he file |
|00005170| 6d 75 73 74 20 6e 6f 74 | 20 65 78 69 73 74 20 6f |must not| exist o|
|00005180| 72 20 61 6e 20 65 72 72 | 6f 72 20 72 65 73 75 6c |r an err|or resul|
|00005190| 74 73 20 69 6e 20 6f 72 | 64 65 72 20 74 6f 20 70 |ts in or|der to p|
|000051a0| 72 65 76 65 6e 74 0a 74 | 68 65 20 61 63 63 69 64 |revent.t|he accid|
|000051b0| 65 6e 74 61 6c 20 64 65 | 73 74 72 75 63 74 69 6f |ental de|structio|
|000051c0| 6e 20 6f 66 20 66 69 6c | 65 73 2e 0a 58 2e 50 50 |n of fil|es..X.PP|
|000051d0| 0a 58 2e 48 50 20 35 0a | 58 5c 66 42 3e 25 5c 66 |.X.HP 5.|X\fB>%\f|
|000051e0| 50 20 5c 66 49 64 65 73 | 63 72 69 70 74 6f 72 5c |P \fIdes|criptor\|
|000051f0| 66 50 0a 58 2e 62 72 0a | 58 2e 6e 73 0a 58 2e 48 |fP.X.br.|X.ns.X.H|
|00005200| 50 20 35 0a 58 5c 66 42 | 3e 21 25 5c 66 50 20 5c |P 5.X\fB|>!%\fP \|
|00005210| 66 49 64 65 73 63 72 69 | 70 74 6f 72 5c 66 50 0a |fIdescri|ptor\fP.|
|00005220| 58 2e 62 72 0a 58 2e 6e | 73 0a 58 2e 48 50 20 35 |X.br.X.n|s.X.HP 5|
|00005230| 0a 58 5c 66 42 3e 26 25 | 5c 66 50 20 5c 66 49 64 |.X\fB>&%|\fP \fId|
|00005240| 65 73 63 72 69 70 74 6f | 72 5c 66 50 0a 58 2e 62 |escripto|r\fP.X.b|
|00005250| 72 0a 58 2e 6e 73 0a 4f | 70 65 6e 73 20 61 20 66 |r.X.ns.O|pens a f|
|00005260| 69 6c 65 20 6f 72 20 70 | 69 70 65 20 72 65 66 65 |ile or p|ipe refe|
|00005270| 72 65 6e 63 65 64 20 62 | 79 0a 58 2e 49 20 64 65 |renced b|y.X.I de|
|00005280| 73 63 72 69 70 74 6f 72 | 0a 66 6f 72 20 6f 75 74 |scriptor|.for out|
|00005290| 70 75 74 20 6f 6e 20 74 | 68 65 20 63 6f 6d 6d 61 |put on t|he comma|
|000052a0| 6e 64 73 0a 58 2e 49 20 | 73 74 64 6f 75 74 2c 20 |nds.X.I |stdout, |
|000052b0| 73 74 64 65 72 72 0a 6f | 72 20 62 6f 74 68 2e 20 |stderr.o|r both. |
|000052c0| 20 4c 69 6b 65 20 60 3c | 25 27 20 61 62 6f 76 65 | Like `<|%' above|
|000052d0| 2c 20 61 20 70 69 70 65 | 20 69 73 20 63 72 65 61 |, a pipe| is crea|
|000052e0| 74 65 64 20 69 66 20 74 | 68 65 20 64 65 73 63 72 |ted if t|he descr|
|000052f0| 69 70 74 6f 72 20 64 6f | 65 73 20 6e 6f 74 0a 72 |iptor do|es not.r|
|00005300| 65 66 65 72 65 6e 63 65 | 20 61 20 70 72 65 2d 65 |eference| a pre-e|
|00005310| 78 69 73 74 69 6e 67 20 | 6f 62 6a 65 63 74 2e 20 |xisting |object. |
|00005320| 20 54 68 65 20 77 72 69 | 74 65 2d 73 69 64 65 20 | The wri|te-side |
|00005330| 6f 66 20 61 20 70 69 70 | 65 20 69 73 20 61 6c 73 |of a pip|e is als|
|00005340| 6f 20 63 6c 6f 73 65 64 | 20 61 74 0a 74 68 65 20 |o closed| at.the |
|00005350| 73 68 65 6c 6c 20 6c 65 | 76 65 6c 20 61 73 20 70 |shell le|vel as p|
|00005360| 65 72 20 60 3c 25 27 2e | 0a 58 2e 50 50 0a 58 2e |er `<%'.|.X.PP.X.|
|00005370| 48 50 20 35 0a 58 5c 66 | 42 3e 3e 5c 66 50 20 5c |HP 5.X\f|B>>\fP \|
|00005380| 66 49 6e 61 6d 65 5c 66 | 50 0a 58 2e 62 72 0a 58 |fIname\f|P.X.br.X|
|00005390| 2e 6e 73 0a 58 2e 48 50 | 20 35 0a 58 5c 66 42 3e |.ns.X.HP| 5.X\fB>|
|000053a0| 3e 21 5c 66 50 20 5c 66 | 49 6e 61 6d 65 5c 66 50 |>!\fP \f|Iname\fP|
|000053b0| 0a 58 2e 62 72 0a 58 2e | 6e 73 0a 58 2e 48 50 20 |.X.br.X.|ns.X.HP |
|000053c0| 35 0a 58 5c 66 42 3e 3e | 26 5c 66 50 20 5c 66 49 |5.X\fB>>|&\fP \fI|
|000053d0| 6e 61 6d 65 5c 66 50 0a | 58 2e 62 72 0a 58 2e 6e |name\fP.|X.br.X.n|
|000053e0| 73 0a 4c 69 6b 65 20 60 | 3e 27 2c 20 60 3e 21 27 |s.Like `|>', `>!'|
|000053f0| 20 61 6e 64 20 60 3e 26 | 27 20 61 62 6f 76 65 2c | and `>&|' above,|
|00005400| 20 65 78 63 65 70 74 20 | 74 68 61 74 20 74 68 65 | except |that the|
|00005410| 20 72 65 64 69 72 65 63 | 74 69 6f 6e 20 61 70 70 | redirec|tion app|
|00005420| 65 6e 64 73 20 74 6f 20 | 66 69 6c 65 73 0a 72 61 |ends to |files.ra|
|00005430| 74 68 65 72 20 74 68 61 | 6e 20 6f 76 65 72 77 72 |ther tha|n overwr|
|00005440| 69 74 69 6e 67 20 74 68 | 65 6d 2e 20 49 66 20 74 |iting th|em. If t|
|00005450| 68 65 20 76 61 72 69 61 | 62 6c 65 0a 58 2e 49 20 |he varia|ble.X.I |
|00005460| 6e 6f 63 6c 6f 62 62 65 | 72 0a 65 78 69 73 74 73 |noclobbe|r.exists|
|00005470| 20 74 68 65 6e 20 69 74 | 20 69 73 20 61 6e 20 65 | then it| is an e|
|00005480| 72 72 6f 72 20 66 6f 72 | 20 74 68 65 20 66 69 6c |rror for| the fil|
|00005490| 65 20 6e 6f 74 20 74 6f | 20 65 78 69 73 74 2e 0a |e not to| exist..|
|000054a0| 58 2e 50 50 0a 58 2e 48 | 50 20 35 0a 58 5c 66 42 |X.PP.X.H|P 5.X\fB|
|000054b0| 3e 3e 25 5c 66 50 20 5c | 66 49 64 65 73 63 72 69 |>>%\fP \|fIdescri|
|000054c0| 70 74 6f 72 5c 66 50 0a | 58 2e 62 72 0a 58 2e 6e |ptor\fP.|X.br.X.n|
|000054d0| 73 0a 58 2e 48 50 20 35 | 0a 58 5c 66 42 3e 3e 21 |s.X.HP 5|.X\fB>>!|
|000054e0| 25 5c 66 50 20 5c 66 49 | 64 65 73 63 72 69 70 74 |%\fP \fI|descript|
|000054f0| 6f 72 5c 66 50 0a 58 2e | 62 72 0a 58 2e 6e 73 0a |or\fP.X.|br.X.ns.|
|00005500| 58 2e 48 50 20 35 0a 58 | 5c 66 42 3e 3e 26 25 5c |X.HP 5.X|\fB>>&%\|
|00005510| 66 50 20 5c 66 49 64 65 | 73 63 72 69 70 74 6f 72 |fP \fIde|scriptor|
|00005520| 5c 66 50 0a 58 2e 62 72 | 0a 58 2e 6e 73 0a 41 73 |\fP.X.br|.X.ns.As|
|00005530| 20 60 3e 25 27 2c 20 60 | 3e 21 25 27 20 61 6e 64 | `>%', `|>!%' and|
|00005540| 20 60 3e 26 25 27 20 61 | 62 6f 76 65 2c 20 68 6f | `>&%' a|bove, ho|
|00005550| 77 65 76 65 72 20 74 68 | 65 20 77 72 69 74 65 2d |wever th|e write-|
|00005560| 73 69 64 65 20 6f 66 20 | 74 68 65 20 70 69 70 65 |side of |the pipe|
|00005570| 20 72 65 6d 61 69 6e 73 | 0a 6f 70 65 6e 20 61 74 | remains|.open at|
|00005580| 20 74 68 65 20 73 68 65 | 6c 6c 20 6c 65 76 65 6c | the she|ll level|
|00005590| 20 66 6f 72 20 66 75 72 | 74 68 65 72 20 75 73 65 | for fur|ther use|
|000055a0| 2e 0a 58 2e 50 50 0a 58 | 2e 48 50 20 35 0a 58 5c |..X.PP.X|.HP 5.X\|
|000055b0| 66 49 63 6d 64 5c 66 50 | 20 5c 66 42 7c 5c 66 50 |fIcmd\fP| \fB|\fP|
|000055c0| 20 5c 66 49 63 6d 64 32 | 5c 66 50 0a 58 2e 62 72 | \fIcmd2|\fP.X.br|
|000055d0| 0a 58 2e 6e 73 0a 58 2e | 48 50 20 35 0a 58 5c 66 |.X.ns.X.|HP 5.X\f|
|000055e0| 49 63 6d 64 5c 66 50 20 | 5c 66 42 7c 21 5c 66 50 |Icmd\fP |\fB|!\fP|
|000055f0| 20 5c 66 49 63 6d 64 32 | 5c 66 50 0a 58 2e 62 72 | \fIcmd2|\fP.X.br|
|00005600| 0a 58 2e 6e 73 0a 58 2e | 48 50 20 35 0a 58 5c 66 |.X.ns.X.|HP 5.X\f|
|00005610| 49 63 6d 64 5c 66 50 20 | 5c 66 42 7c 26 5c 66 50 |Icmd\fP |\fB|&\fP|
|00005620| 20 5c 66 49 63 6d 64 32 | 5c 66 50 0a 58 2e 62 72 | \fIcmd2|\fP.X.br|
|00005630| 0a 58 2e 6e 73 0a 50 69 | 70 65 73 20 74 68 65 20 |.X.ns.Pi|pes the |
|00005640| 6f 75 74 70 75 74 20 6f | 66 20 74 68 65 0a 58 2e |output o|f the.X.|
|00005650| 49 20 73 74 64 6f 75 74 | 0a 58 60 7c 27 2c 0a 58 |I stdout|.X`|',.X|
|00005660| 2e 49 20 73 74 64 65 72 | 72 0a 58 60 7c 21 27 20 |.I stder|r.X`|!' |
|00005670| 6f 72 20 62 6f 74 68 20 | 60 7c 26 27 20 6f 66 0a |or both |`|&' of.|
|00005680| 58 2e 49 20 63 6d 64 0a | 69 6e 74 6f 20 74 68 65 |X.I cmd.|into the|
|00005690| 0a 58 2e 49 20 73 74 64 | 69 6e 0a 6f 66 0a 58 2e |.X.I std|in.of.X.|
|000056a0| 49 20 63 6d 64 32 2e 0a | 58 2e 50 50 0a 58 0a 54 |I cmd2..|X.PP.X.T|
|000056b0| 68 65 20 72 65 64 69 72 | 65 63 74 69 6f 6e 20 63 |he redir|ection c|
|000056c0| 6f 6e 73 74 72 75 63 74 | 73 20 60 3c 25 27 2c 20 |onstruct|s `<%', |
|000056d0| 60 3e 25 27 2c 20 65 74 | 63 2c 20 63 61 6e 20 62 |`>%', et|c, can b|
|000056e0| 65 20 75 73 65 64 20 74 | 6f 20 69 6d 70 6c 65 6d |e used t|o implem|
|000056f0| 65 6e 74 0a 74 72 65 65 | 2d 6c 69 6b 65 20 70 69 |ent.tree|-like pi|
|00005700| 70 65 20 73 74 72 75 63 | 74 75 72 65 73 20 61 6e |pe struc|tures an|
|00005710| 64 20 60 72 65 76 65 72 | 73 65 20 70 69 70 69 6e |d `rever|se pipin|
|00005720| 67 27 2e 20 20 45 78 61 | 6d 70 6c 65 73 3a 0a 58 |g'. Exa|mples:.X|
|00005730| 2e 62 72 0a 58 0a 58 20 | 20 20 20 65 72 72 70 61 |.br.X.X | errpa|
|00005740| 72 73 65 20 3c 25 20 65 | 72 72 20 3e 20 65 72 72 |rse <% e|rr > err|
|00005750| 6f 72 73 20 26 20 63 6d | 64 20 3e 21 25 20 65 72 |ors & cm|d >!% er|
|00005760| 72 20 7c 20 63 6d 64 32 | 0a 58 2e 62 72 0a 58 2e |r | cmd2|.X.br.X.|
|00005770| 62 72 0a 58 20 20 20 20 | 63 6d 64 31 20 3c 25 20 |br.X |cmd1 <% |
|00005780| 78 78 20 7c 20 63 6d 64 | 32 20 3e 25 20 78 78 0a |xx | cmd|2 >% xx.|
|00005790| 58 2e 62 72 0a 58 0a 49 | 6e 20 74 68 65 20 66 69 |X.br.X.I|n the fi|
|000057a0| 72 73 74 20 65 78 61 6d | 70 6c 65 2c 20 74 68 65 |rst exam|ple, the|
|000057b0| 20 73 74 64 6f 75 74 20 | 6f 66 20 60 63 6d 64 27 | stdout |of `cmd'|
|000057c0| 20 69 73 20 70 69 70 65 | 64 20 74 6f 20 74 68 65 | is pipe|d to the|
|000057d0| 20 73 74 64 69 6e 20 6f | 66 20 60 63 6d 64 32 27 | stdin o|f `cmd2'|
|000057e0| 0a 61 74 20 74 68 65 20 | 73 61 6d 65 20 74 69 6d |.at the |same tim|
|000057f0| 65 20 74 68 61 74 20 74 | 68 65 20 73 74 64 65 72 |e that t|he stder|
|00005800| 72 20 6f 66 20 60 63 6d | 64 27 20 69 73 20 70 69 |r of `cm|d' is pi|
|00005810| 70 65 64 20 74 6f 20 74 | 68 65 20 73 74 64 69 6e |ped to t|he stdin|
|00005820| 20 6f 66 0a 58 60 65 72 | 72 70 61 72 73 65 27 2c | of.X`er|rparse',|
|00005830| 20 77 68 69 63 68 20 69 | 73 20 73 70 61 77 65 64 | which i|s spawed|
|00005840| 20 69 6e 20 74 68 65 20 | 62 61 63 6b 67 72 6f 75 | in the |backgrou|
|00005850| 6e 64 2c 20 73 6f 20 61 | 6c 6c 20 74 68 72 65 65 |nd, so a|ll three|
|00005860| 20 63 6f 6d 6d 61 6e 64 | 73 20 72 75 6e 0a 63 6f | command|s run.co|
|00005870| 6e 63 75 72 72 65 6e 74 | 6c 79 2e 20 49 6e 20 74 |ncurrent|ly. In t|
|00005880| 68 65 20 73 65 63 6f 6e | 64 20 65 78 61 6d 70 6c |he secon|d exampl|
|00005890| 65 20 74 68 65 20 74 77 | 6f 20 63 6f 6d 6d 61 6e |e the tw|o comman|
|000058a0| 64 73 20 61 72 65 20 6d | 61 64 65 20 74 6f 0a 63 |ds are m|ade to.c|
|000058b0| 6f 6d 6d 75 6e 69 63 61 | 74 65 20 77 69 74 68 20 |ommunica|te with |
|000058c0| 65 61 63 68 20 6f 74 68 | 65 72 20 76 69 61 20 74 |each oth|er via t|
|000058d0| 68 65 69 72 20 73 74 64 | 69 6e 20 61 6e 64 20 73 |heir std|in and s|
|000058e0| 74 64 6f 75 74 2e 0a 58 | 0a 58 0a 58 2e 53 48 20 |tdout..X|.X.X.SH |
|000058f0| 45 58 50 52 45 53 53 49 | 4f 4e 53 0a 58 0a 54 68 |EXPRESSI|ONS.X.Th|
|00005900| 65 20 73 68 65 6c 6c 20 | 73 75 70 70 6f 72 74 73 |e shell |supports|
|00005910| 20 43 20 6c 69 6b 65 20 | 65 78 70 72 65 73 73 69 | C like |expressi|
|00005920| 6f 6e 73 20 74 68 61 74 | 20 61 72 65 20 75 73 65 |ons that| are use|
|00005930| 64 20 69 6e 20 73 6f 6d | 65 20 62 75 69 6c 74 69 |d in som|e builti|
|00005940| 6e 0a 63 6f 6d 6d 61 6e | 64 73 20 61 6e 64 20 66 |n.comman|ds and f|
|00005950| 6f 72 20 69 6e 64 65 78 | 65 73 20 66 6f 72 20 73 |or index|es for s|
|00005960| 74 72 69 6e 67 20 76 61 | 72 69 61 62 6c 65 73 2e |tring va|riables.|
|00005970| 20 20 54 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 | The fo|llowing |
|00005980| 6f 70 65 72 61 74 6f 72 | 73 0a 61 72 65 20 73 75 |operator|s.are su|
|00005990| 70 70 6f 72 74 65 64 3a | 0a 58 0a 58 28 20 20 20 |pported:|.X.X( |
|000059a0| 29 0a 58 2e 62 72 0a 58 | 21 20 20 20 7e 20 20 20 |).X.br.X|! ~ |
|000059b0| 2b 2b 20 20 2d 2d 20 20 | 2b 20 20 20 2d 20 28 75 |++ -- |+ - (u|
|000059c0| 6e 61 72 79 29 0a 58 2e | 62 72 0a 58 2a 20 20 20 |nary).X.|br.X* |
|000059d0| 2f 20 20 20 25 0a 58 2e | 62 72 0a 58 2b 20 20 20 |/ %.X.|br.X+ |
|000059e0| 2d 20 20 20 3c 3c 20 20 | 3e 3e 20 20 26 20 20 20 |- << |>> & |
|000059f0| 5e 20 20 20 7c 0a 58 2e | 62 72 0a 58 3c 20 20 20 |^ |.X.|br.X< |
|00005a00| 3c 3d 20 20 3e 20 20 20 | 3e 3d 20 20 3d 3d 20 20 |<= > |>= == |
|00005a10| 21 3d 20 20 21 7e 20 20 | 3d 7e 0a 58 2e 62 72 0a |!= !~ |=~.X.br.|
|00005a20| 58 26 26 20 20 7c 7c 0a | 58 2e 62 72 0a 58 0a 4e |X&& ||.|X.br.X.N|
|00005a30| 75 6d 62 65 72 73 20 6d | 61 79 20 62 65 20 65 78 |umbers m|ay be ex|
|00005a40| 70 72 65 73 73 65 64 20 | 65 69 74 68 65 72 20 61 |pressed |either a|
|00005a50| 73 20 64 65 63 69 6d 61 | 6c 2c 20 68 65 78 20 28 |s decima|l, hex (|
|00005a60| 77 69 74 68 20 61 20 6c | 65 61 64 69 6e 67 20 30 |with a l|eading 0|
|00005a70| 78 20 6f 72 20 30 58 29 | 2c 0a 6f 63 74 61 6c 20 |x or 0X)|,.octal |
|00005a80| 28 77 69 74 68 20 61 20 | 6c 65 61 64 69 6e 67 20 |(with a |leading |
|00005a90| 30 29 2c 20 6f 72 20 62 | 69 6e 61 72 79 20 28 77 |0), or b|inary (w|
|00005aa0| 69 74 68 20 61 20 6c 65 | 61 64 69 6e 67 20 30 62 |ith a le|ading 0b|
|00005ab0| 20 6f 72 20 30 42 29 2e | 20 46 6f 72 20 65 78 61 | or 0B).| For exa|
|00005ac0| 6d 70 6c 65 3a 0a 58 32 | 35 35 2c 20 30 78 30 30 |mple:.X2|55, 0x00|
|00005ad0| 46 46 2c 20 30 33 37 37 | 20 61 6e 64 20 30 62 31 |FF, 0377| and 0b1|
|00005ae0| 31 31 31 31 31 31 31 20 | 61 72 65 20 61 6c 6c 20 |1111111 |are all |
|00005af0| 65 71 75 69 76 61 6c 65 | 6e 74 2e 20 20 49 6e 20 |equivale|nt. In |
|00005b00| 73 73 68 2c 20 61 6c 6c | 20 6e 75 6d 62 65 72 73 |ssh, all| numbers|
|00005b10| 0a 61 72 65 20 73 69 67 | 6e 65 64 20 6c 6f 6e 67 |.are sig|ned long|
|00005b20| 77 6f 72 64 20 69 6e 74 | 65 67 65 72 73 2e 20 60 |word int|egers. `|
|00005b30| 2b 2b 27 20 61 6e 64 20 | 60 2d 2d 27 20 6f 6e 6c |++' and |`--' onl|
|00005b40| 79 20 6f 70 65 72 61 74 | 65 20 6f 6e 20 6e 75 6d |y operat|e on num|
|00005b50| 65 72 69 63 0a 76 61 72 | 69 61 62 6c 65 73 2e 20 |eric.var|iables. |
|00005b60| 20 53 74 72 69 6e 67 73 | 20 61 6e 64 20 73 74 72 | Strings| and str|
|00005b70| 69 6e 67 20 76 61 72 69 | 61 62 6c 65 73 20 63 61 |ing vari|ables ca|
|00005b80| 6e 20 6f 6e 6c 79 20 62 | 65 20 63 6f 6d 70 61 72 |n only b|e compar|
|00005b90| 65 64 20 74 6f 67 65 74 | 68 65 72 20 61 6e 64 0a |ed toget|her and.|
|00005ba0| 6f 6e 6c 79 20 74 68 65 | 6e 2c 20 63 61 6e 20 74 |only the|n, can t|
|00005bb0| 77 6f 20 73 74 72 69 6e | 67 73 20 62 65 20 63 6f |wo strin|gs be co|
|00005bc0| 6d 70 61 72 65 64 2e 20 | 20 41 20 73 69 6e 67 6c |mpared. | A singl|
|00005bd0| 65 20 73 74 72 69 6e 67 | 20 65 71 75 61 74 65 73 |e string| equates|
|00005be0| 20 74 6f 20 74 72 75 65 | 2e 0a 54 68 65 20 6f 70 | to true|..The op|
|00005bf0| 65 72 61 74 6f 72 73 20 | 60 3d 7e 27 20 61 6e 64 |erators |`=~' and|
|00005c00| 20 60 21 7e 27 20 63 6f | 6d 70 61 72 65 20 61 20 | `!~' co|mpare a |
|00005c10| 73 74 72 69 6e 67 20 28 | 6f 6e 20 74 68 65 20 6c |string (|on the l|
|00005c20| 65 66 74 20 73 69 64 65 | 20 6f 66 20 74 68 65 0a |eft side| of the.|
|00005c30| 6f 70 65 72 61 74 6f 72 | 29 20 61 6e 64 20 61 20 |operator|) and a |
|00005c40| 70 61 74 74 65 72 6e 20 | 28 6f 6e 20 74 68 65 20 |pattern |(on the |
|00005c50| 72 69 67 68 74 20 73 69 | 64 65 20 6f 66 20 74 68 |right si|de of th|
|00005c60| 65 20 6f 70 65 72 61 74 | 6f 72 29 20 66 6f 72 20 |e operat|or) for |
|00005c70| 61 20 6d 61 74 63 68 20 | 6f 72 0a 6c 61 63 6b 20 |a match |or.lack |
|00005c80| 74 68 65 72 65 6f 66 2e | 0a 58 0a 41 20 64 61 73 |thereof.|.X.A das|
|00005c90| 68 20 60 2d 27 20 66 6f | 6c 6c 6f 77 65 64 20 62 |h `-' fo|llowed b|
|00005ca0| 79 20 6f 6e 65 20 6f 66 | 20 60 64 65 66 67 6d 6f |y one of| `defgmo|
|00005cb0| 70 72 73 75 77 78 7a 27 | 20 74 65 73 74 20 74 68 |prsuwxz'| test th|
|00005cc0| 65 20 6e 65 78 74 20 61 | 72 67 75 6d 65 6e 74 2c |e next a|rgument,|
|00005cd0| 20 74 61 6b 65 6e 0a 74 | 6f 20 62 65 20 61 20 66 | taken.t|o be a f|
|00005ce0| 69 6c 65 6e 61 6d 65 2c | 20 66 6f 72 20 73 6f 6d |ilename,| for som|
|00005cf0| 65 20 70 72 6f 70 65 72 | 74 79 20 6f 66 20 74 68 |e proper|ty of th|
|00005d00| 61 74 20 66 69 6c 65 2e | 20 20 54 68 65 73 65 20 |at file.| These |
|00005d10| 73 77 69 74 63 68 65 73 | 20 68 61 76 65 20 74 68 |switches| have th|
|00005d20| 65 0a 66 6f 6c 6c 6f 77 | 69 6e 67 20 70 72 6f 70 |e.follow|ing prop|
|00005d30| 65 72 74 69 65 73 3a 0a | 58 2e 54 50 0a 58 2e 42 |erties:.|X.TP.X.B|
|00005d40| 20 2d 64 0a 54 72 75 65 | 20 69 66 20 66 69 6c 65 | -d.True| if file|
|00005d50| 20 69 73 20 61 20 64 69 | 72 65 63 74 6f 72 79 2e | is a di|rectory.|
|00005d60| 0a 58 2e 50 50 0a 58 2e | 54 50 0a 58 2e 42 20 2d |.X.PP.X.|TP.X.B -|
|00005d70| 65 0a 54 72 75 65 20 69 | 66 20 66 69 6c 65 20 65 |e.True i|f file e|
|00005d80| 78 69 73 74 73 2e 0a 58 | 2e 50 50 0a 58 2e 54 50 |xists..X|.PP.X.TP|
|00005d90| 0a 58 2e 42 20 2d 66 0a | 54 72 75 65 20 69 66 20 |.X.B -f.|True if |
|00005da0| 66 69 6c 65 20 69 73 20 | 61 20 72 65 67 75 6c 61 |file is |a regula|
|00005db0| 72 20 66 69 6c 65 2e 0a | 58 2e 50 50 0a 58 2e 54 |r file..|X.PP.X.T|
|00005dc0| 50 0a 58 2e 42 20 2d 67 | 0a 52 65 74 75 72 6e 73 |P.X.B -g|.Returns|
|00005dd0| 20 74 68 65 20 47 72 6f | 75 70 20 49 44 20 6f 66 | the Gro|up ID of|
|00005de0| 20 74 68 65 20 66 69 6c | 65 2e 0a 58 2e 50 50 0a | the fil|e..X.PP.|
|00005df0| 58 2e 54 50 0a 58 2e 42 | 20 2d 6d 0a 52 65 74 75 |X.TP.X.B| -m.Retu|
|00005e00| 72 6e 73 20 74 68 65 20 | 65 6e 74 69 72 65 20 6d |rns the |entire m|
|00005e10| 6f 64 65 20 77 6f 72 64 | 20 6f 66 20 74 68 65 20 |ode word| of the |
|00005e20| 66 69 6c 65 2e 0a 58 2e | 50 50 0a 58 2e 54 50 0a |file..X.|PP.X.TP.|
|00005e30| 58 2e 42 20 2d 6f 0a 54 | 72 75 65 20 69 66 20 66 |X.B -o.T|rue if f|
|00005e40| 69 6c 65 20 69 73 20 6f | 77 6e 65 64 20 62 79 20 |ile is o|wned by |
|00005e50| 74 68 65 20 75 73 65 72 | 2e 0a 58 2e 50 50 0a 58 |the user|..X.PP.X|
|00005e60| 2e 54 50 0a 58 2e 42 20 | 2d 70 0a 52 65 74 75 72 |.TP.X.B |-p.Retur|
|00005e70| 6e 73 20 74 68 65 20 70 | 72 6f 74 65 63 74 69 6f |ns the p|rotectio|
|00005e80| 6e 20 62 69 74 73 20 6f | 66 20 74 68 65 20 66 69 |n bits o|f the fi|
|00005e90| 6c 65 2e 0a 58 2e 50 50 | 0a 58 2e 54 50 0a 58 2e |le..X.PP|.X.TP.X.|
|00005ea0| 42 20 2d 72 0a 54 72 75 | 65 20 69 66 20 66 69 6c |B -r.Tru|e if fil|
|00005eb0| 65 20 69 73 20 72 65 61 | 64 61 62 6c 65 2e 0a 58 |e is rea|dable..X|
|00005ec0| 2e 50 50 0a 58 2e 54 50 | 0a 58 2e 42 20 2d 73 0a |.PP.X.TP|.X.B -s.|
|00005ed0| 52 65 74 75 72 6e 73 20 | 74 68 65 20 73 69 7a 65 |Returns |the size|
|00005ee0| 20 6f 66 20 74 68 65 20 | 66 69 6c 65 20 69 6e 20 | of the |file in |
|00005ef0| 62 79 74 65 73 2e 0a 58 | 2e 50 50 0a 58 2e 54 50 |bytes..X|.PP.X.TP|
|00005f00| 0a 58 2e 42 20 2d 75 0a | 52 65 74 75 72 6e 73 20 |.X.B -u.|Returns |
|00005f10| 74 68 65 20 55 73 65 72 | 20 49 44 20 6f 66 20 74 |the User| ID of t|
|00005f20| 68 65 20 66 69 6c 65 20 | 6f 77 6e 65 72 2e 0a 58 |he file |owner..X|
|00005f30| 2e 50 50 0a 58 2e 54 50 | 0a 58 2e 42 20 2d 77 0a |.PP.X.TP|.X.B -w.|
|00005f40| 54 72 75 65 20 69 66 20 | 66 69 6c 65 20 70 65 72 |True if |file per|
|00005f50| 6d 69 74 73 20 77 72 69 | 74 69 6e 67 2e 0a 58 2e |mits wri|ting..X.|
|00005f60| 50 50 0a 58 2e 54 50 0a | 58 2e 42 20 2d 78 0a 54 |PP.X.TP.|X.B -x.T|
|00005f70| 72 75 65 20 69 66 20 66 | 69 6c 65 20 69 73 20 65 |rue if f|ile is e|
|00005f80| 78 65 63 75 74 61 62 6c | 65 2e 0a 58 2e 50 50 0a |xecutabl|e..X.PP.|
|00005f90| 58 2e 54 50 0a 58 2e 42 | 20 2d 7a 0a 54 72 75 65 |X.TP.X.B| -z.True|
|00005fa0| 20 69 66 20 66 69 6c 65 | 20 69 73 20 7a 65 72 6f | if file| is zero|
|00005fb0| 20 6c 65 6e 67 74 68 2e | 0a 58 2e 50 50 0a 58 0a | length.|.X.PP.X.|
|00005fc0| 58 2e 53 48 20 42 55 49 | 4c 54 49 4e 20 43 4f 4d |X.SH BUI|LTIN COM|
|00005fd0| 4d 41 4e 44 53 0a 58 0a | 42 75 69 6c 74 69 6e 20 |MANDS.X.|Builtin |
|00005fe0| 63 6f 6d 6d 61 6e 64 73 | 20 61 72 65 20 6e 6f 72 |commands| are nor|
|00005ff0| 6d 61 6c 6c 79 20 65 78 | 65 63 75 74 65 64 20 77 |mally ex|ecuted w|
|00006000| 69 74 68 69 6e 20 74 68 | 65 20 63 6f 6e 74 65 78 |ithin th|e contex|
|00006010| 74 20 6f 66 20 74 68 65 | 20 73 68 65 6c 6c 2c 0a |t of the| shell,.|
|00006020| 68 6f 77 65 76 65 72 2c | 20 69 66 20 74 68 65 79 |however,| if they|
|00006030| 20 61 72 65 20 69 6e 63 | 6c 75 64 65 64 20 69 6e | are inc|luded in|
|00006040| 20 61 20 70 69 70 65 6c | 69 6e 65 20 28 65 78 63 | a pipel|ine (exc|
|00006050| 65 70 74 20 61 73 20 74 | 68 65 20 6c 61 73 74 20 |ept as t|he last |
|00006060| 63 6f 6d 6d 61 6e 64 20 | 69 6e 0a 74 68 65 20 70 |command |in.the p|
|00006070| 69 70 65 6c 69 6e 65 29 | 20 6f 72 20 70 6c 61 63 |ipeline)| or plac|
|00006080| 65 64 20 69 6e 20 74 68 | 65 20 62 61 63 6b 67 72 |ed in th|e backgr|
|00006090| 6f 75 6e 64 2c 20 74 68 | 65 79 20 61 72 65 20 74 |ound, th|ey are t|
|000060a0| 68 65 6e 20 65 78 65 63 | 75 74 65 64 20 69 6e 20 |hen exec|uted in |
|000060b0| 61 0a 73 75 62 73 68 65 | 6c 6c 2e 20 4d 75 6c 74 |a.subshe|ll. Mult|
|000060c0| 69 2d 6c 69 6e 65 20 63 | 6f 6d 6d 61 6e 64 73 20 |i-line c|ommands |
|000060d0| 6c 69 6b 65 0a 58 2e 49 | 20 66 6f 72 2d 6e 65 78 |like.X.I| for-nex|
|000060e0| 74 2c 20 72 65 70 65 61 | 74 2d 75 6e 74 69 6c 2c |t, repea|t-until,|
|000060f0| 0a 61 6e 64 0a 58 2e 49 | 20 69 66 2d 74 68 65 6e |.and.X.I| if-then|
|00006100| 2d 65 6c 73 65 2d 65 6e | 64 69 66 0a 63 6f 6d 6d |-else-en|dif.comm|
|00006110| 61 6e 64 73 20 61 72 65 | 20 6f 6e 6c 79 20 75 73 |ands are| only us|
|00006120| 61 62 6c 65 20 69 6e 20 | 73 68 65 6c 6c 20 73 63 |able in |shell sc|
|00006130| 72 69 70 74 73 2e 0a 58 | 2e 54 50 0a 58 5c 66 42 |ripts..X|.TP.X\fB|
|00006140| 61 6c 69 61 73 5c 66 50 | 20 5b 3c 5c 66 49 6e 61 |alias\fP| [<\fIna|
|00006150| 6d 65 5c 66 50 3e 20 5b | 3c 5c 66 49 77 6f 72 64 |me\fP> [|<\fIword|
|00006160| 6c 69 73 74 5c 66 50 3e | 5d 5d 0a 41 6c 69 61 73 |list\fP>|]].Alias|
|00006170| 20 77 69 74 68 20 6e 6f | 20 61 72 67 75 6d 65 6e | with no| argumen|
|00006180| 74 73 20 6c 69 73 74 73 | 20 61 6c 6c 20 74 68 65 |ts lists| all the|
|00006190| 20 61 6c 69 61 73 65 73 | 2c 20 4f 6e 65 20 61 72 | aliases|, One ar|
|000061a0| 67 75 6d 65 6e 74 2c 20 | 77 68 69 63 68 20 6d 61 |gument, |which ma|
|000061b0| 79 0a 62 65 20 61 20 77 | 69 6c 64 63 61 72 64 2c |y.be a w|ildcard,|
|000061c0| 20 6c 69 73 74 73 20 61 | 6c 6c 20 61 6c 69 61 73 | lists a|ll alias|
|000061d0| 65 73 20 74 68 61 74 20 | 6d 61 74 63 68 65 73 20 |es that |matches |
|000061e0| 69 74 2e 20 54 77 6f 20 | 6f 72 20 6d 6f 72 65 20 |it. Two |or more |
|000061f0| 61 72 67 75 6d 65 6e 74 | 73 0a 6d 61 6b 65 73 20 |argument|s.makes |
|00006200| 61 6e 20 61 6c 69 61 73 | 20 61 73 73 69 67 6e 6d |an alias| assignm|
|00006210| 65 6e 74 2e 0a 58 2e 50 | 50 0a 58 0a 58 2e 54 50 |ent..X.P|P.X.X.TP|
|00006220| 0a 58 5c 66 42 61 73 73 | 69 67 6e 5c 66 50 20 5b |.X\fBass|ign\fP [|
|00006230| 3c 5c 66 49 6e 61 6d 65 | 5c 66 50 3e 20 5b 3c 5c |<\fIname|\fP> [<\|
|00006240| 66 49 61 73 73 69 67 6e | 6d 65 6e 74 5c 66 50 3e |fIassign|ment\fP>|
|00006250| 5d 5d 0a 41 73 73 69 67 | 6e 20 77 69 74 68 20 6e |]].Assig|n with n|
|00006260| 6f 20 61 72 67 75 6d 65 | 6e 74 73 20 6c 69 73 74 |o argume|nts list|
|00006270| 73 20 61 6c 6c 20 6c 6f | 67 69 63 61 6c 20 61 73 |s all lo|gical as|
|00006280| 73 69 67 6e 6d 65 6e 74 | 73 2c 20 4f 6e 65 20 61 |signment|s, One a|
|00006290| 72 67 75 6d 65 6e 74 0a | 72 65 74 75 72 6e 73 20 |rgument.|returns |
|000062a0| 74 68 65 20 76 61 6c 75 | 65 20 6f 66 20 74 68 61 |the valu|e of tha|
|000062b0| 74 20 70 61 72 74 69 63 | 75 6c 61 72 20 61 73 73 |t partic|ular ass|
|000062c0| 69 67 6e 6d 65 6e 74 2e | 20 54 77 6f 20 61 72 67 |ignment.| Two arg|
|000062d0| 75 6d 65 6e 74 73 20 6d | 61 6b 65 73 20 6f 72 0a |uments m|akes or.|
|000062e0| 63 68 61 6e 67 65 73 20 | 61 20 6c 6f 67 69 63 61 |changes |a logica|
|000062f0| 6c 20 61 73 73 69 67 6e | 6d 65 6e 74 2e 0a 58 2e |l assign|ment..X.|
|00006300| 50 50 0a 58 0a 58 2e 54 | 50 0a 58 5c 66 42 62 67 |PP.X.X.T|P.X\fBbg|
|00006310| 5c 66 50 20 5b 3c 5c 66 | 49 6a 6f 62 20 6e 75 6d |\fP [<\f|Ijob num|
|00006320| 62 65 72 5c 66 50 3e 5d | 0a 57 69 74 68 20 6e 6f |ber\fP>]|.With no|
|00006330| 20 61 72 67 75 6d 65 6e | 74 2c 0a 58 2e 49 20 62 | argumen|t,.X.I b|
|00006340| 67 0a 70 75 74 73 20 74 | 68 65 20 66 69 72 73 74 |g.puts t|he first|
|00006350| 20 73 74 6f 70 70 65 64 | 20 6a 6f 62 20 69 74 20 | stopped| job it |
|00006360| 66 69 6e 64 73 20 69 6e | 74 6f 20 74 68 65 20 62 |finds in|to the b|
|00006370| 61 63 6b 67 72 6f 75 6e | 64 20 61 6e 64 20 73 74 |ackgroun|d and st|
|00006380| 61 72 74 73 20 69 74 0a | 72 75 6e 6e 69 6e 67 2e |arts it.|running.|
|00006390| 20 41 20 70 61 72 74 69 | 63 75 6c 61 72 20 6a 6f | A parti|cular jo|
|000063a0| 62 20 63 61 6e 20 62 65 | 20 73 65 6c 65 63 74 65 |b can be| selecte|
|000063b0| 64 20 62 79 20 70 72 6f | 76 69 64 69 6e 67 20 62 |d by pro|viding b|
|000063c0| 67 20 77 69 74 68 20 61 | 6e 20 61 72 67 75 6d 65 |g with a|n argume|
|000063d0| 6e 74 0a 73 70 65 63 69 | 66 79 69 6e 67 20 74 68 |nt.speci|fying th|
|000063e0| 65 20 6a 6f 62 20 6e 75 | 6d 62 65 72 2e 0a 58 2e |e job nu|mber..X.|
|000063f0| 50 50 0a 58 0a 58 2e 54 | 50 0a 58 2e 42 20 62 72 |PP.X.X.T|P.X.B br|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.