home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: pipscrpt.tar
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), file pipescript/, mode 755 , uid 243 , gid 12 , size 0 , seconds 4404323016
| default
| |
98%
| file
| data
| default
| |
100%
| siegfried
| x-fmt/265 Tape Archive Format
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 70 69 70 65 73 63 72 69 | 70 74 2f 00 00 00 00 00 |pipescri|pt/.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 35 35 20 00 20 20 20 32 |.... 7|55 . 2|
|00000070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 34 34 30 34 33 32 33 | 0 | 4404323|
|00000090| 30 31 36 20 20 20 36 31 | 37 32 00 20 00 00 00 00 |016 61|72. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 70 69 70 65 73 63 72 69 | 70 74 2f 53 68 61 72 46 |pipescri|pt/SharF|
|00000210| 69 6c 65 2e 48 65 61 64 | 65 72 73 00 00 00 00 00 |ile.Head|ers.....|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000270| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000280| 20 20 20 31 32 34 32 20 | 20 34 34 30 34 33 32 33 | 1242 | 4404323|
|00000290| 30 32 30 20 20 31 31 32 | 34 33 00 20 00 00 00 00 |020 112|43. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 3d 3d 3d 20 70 69 70 65 | 73 63 72 69 70 74 2e 73 |=== pipe|script.s|
|00000410| 68 61 72 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |har ====|========|
|00000420| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 46 72 |========|=====.Fr|
|00000430| 6f 6d 20 72 69 61 63 73 | 21 65 6f 73 21 61 6d 65 |om riacs|!eos!ame|
|00000440| 73 21 6e 72 6c 2d 63 6d | 66 21 75 6b 6d 61 21 67 |s!nrl-cm|f!ukma!g|
|00000450| 61 74 65 63 68 21 62 62 | 6e 21 62 62 6e 2e 63 6f |atech!bb|n!bbn.co|
|00000460| 6d 21 72 73 61 6c 7a 20 | 54 68 75 20 46 65 62 20 |m!rsalz |Thu Feb |
|00000470| 20 39 20 30 39 3a 33 36 | 3a 33 39 20 50 53 54 20 | 9 09:36|:39 PST |
|00000480| 31 39 38 39 0a 0a 53 75 | 62 6d 69 74 74 65 64 2d |1989..Su|bmitted-|
|00000490| 62 79 3a 20 4b 65 6e 74 | 20 46 6f 72 73 63 68 6d |by: Kent| Forschm|
|000004a0| 69 65 64 74 20 3c 68 61 | 70 70 79 6d 21 6b 65 6e |iedt <ha|ppym!ken|
|000004b0| 74 3e 0a 50 6f 73 74 69 | 6e 67 2d 6e 75 6d 62 65 |t>.Posti|ng-numbe|
|000004c0| 72 3a 20 56 6f 6c 75 6d | 65 20 31 37 2c 20 49 73 |r: Volum|e 17, Is|
|000004d0| 73 75 65 20 39 30 0a 41 | 72 63 68 69 76 65 2d 6e |sue 90.A|rchive-n|
|000004e0| 61 6d 65 3a 20 63 73 63 | 72 69 70 74 0a 0a 5b 20 |ame: csc|ript..[ |
|000004f0| 20 54 68 69 73 20 69 73 | 20 6c 69 6b 65 20 74 68 | This is| like th|
|00000500| 65 20 55 43 42 20 22 73 | 63 72 69 70 74 22 20 70 |e UCB "s|cript" p|
|00000510| 72 6f 67 72 61 6d 20 65 | 78 63 65 70 74 20 69 74 |rogram e|xcept it|
|00000520| 20 75 73 65 73 20 70 69 | 70 65 73 2c 0a 20 20 20 | uses pi|pes,. |
|00000530| 6e 6f 74 20 70 73 75 65 | 64 6f 2d 74 74 79 27 73 |not psue|do-tty's|
|00000540| 2e 20 20 53 6f 6d 65 20 | 74 68 69 6e 67 73 20 62 |. Some |things b|
|00000550| 72 65 61 6b 20 77 68 65 | 6e 20 72 75 6e 20 75 6e |reak whe|n run un|
|00000560| 64 65 72 6e 65 61 74 68 | 20 69 74 2c 0a 20 20 20 |derneath| it,. |
|00000570| 62 75 74 20 69 74 27 73 | 20 73 74 69 6c 6c 20 77 |but it's| still w|
|00000580| 6f 72 74 68 77 68 69 6c | 65 2e 20 20 49 20 77 72 |orthwhil|e. I wr|
|00000590| 6f 74 65 20 74 68 65 20 | 4d 61 6b 65 66 69 6c 65 |ote the |Makefile|
|000005a0| 2e 20 20 2d 2d 72 24 20 | 20 5d 0a 0a 54 68 69 73 |. --r$ | ]..This|
|000005b0| 20 69 73 20 61 20 76 65 | 72 79 20 67 65 6e 65 72 | is a ve|ry gener|
|000005c0| 69 63 20 73 63 72 69 70 | 74 20 72 65 63 6f 72 64 |ic scrip|t record|
|000005d0| 65 72 2e 20 20 49 74 20 | 77 6f 72 6b 73 20 66 69 |er. It |works fi|
|000005e0| 6e 65 20 6f 6e 20 6d 6f | 73 74 20 61 6e 79 20 55 |ne on mo|st any U|
|000005f0| 6e 69 78 0a 73 79 73 74 | 65 6d 2e 20 20 49 20 74 |nix.syst|em. I t|
|00000600| 68 69 6e 6b 20 49 20 67 | 6f 74 20 74 68 65 20 6f |hink I g|ot the o|
|00000610| 72 69 67 69 6e 61 6c 20 | 66 72 6f 6d 20 55 6e 69 |riginal |from Uni|
|00000620| 78 2f 57 6f 72 6c 64 20 | 6d 61 67 61 7a 69 6e 65 |x/World |magazine|
|00000630| 2c 20 61 6e 64 20 49 20 | 6d 61 64 65 0a 69 74 20 |, and I |made.it |
|00000640| 77 6f 72 6b 20 61 20 6c | 6f 74 20 62 65 74 74 65 |work a l|ot bette|
|00000650| 72 20 61 6e 64 20 67 61 | 76 65 20 69 74 20 61 20 |r and ga|ve it a |
|00000660| 6d 61 6e 20 70 61 67 65 | 2e 0a 0a 49 20 64 6f 6e |man page|...I don|
|00000670| 27 74 20 6b 6e 6f 77 20 | 69 66 20 6f 6e 65 20 6c |'t know |if one l|
|00000680| 69 6b 65 20 74 68 69 73 | 20 68 61 73 20 62 65 65 |ike this| has bee|
|00000690| 6e 20 70 6f 73 74 65 64 | 20 62 65 66 6f 72 65 2e |n posted| before.|
|000006a0| 0a 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 70 69 70 65 73 63 72 69 | 70 74 2f 4d 61 6b 65 66 |pipescri|pt/Makef|
|00000810| 69 6c 65 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ile.....|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000870| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000880| 20 20 20 20 32 32 32 20 | 20 34 34 30 34 33 32 33 | 222 | 4404323|
|00000890| 30 31 33 20 20 20 37 36 | 37 30 00 20 00 00 00 00 |013 76|70. ....|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 23 0a 23 20 4d 61 6b 65 | 66 69 6c 65 20 66 6f 72 |#.# Make|file for|
|00000a10| 20 63 73 63 72 69 70 74 | 0a 23 0a 61 6c 6c 3a 20 | cscript|.#.all: |
|00000a20| 63 73 63 72 69 70 74 0a | 0a 63 73 63 72 69 70 74 |cscript.|.cscript|
|00000a30| 3a 09 63 73 63 72 69 70 | 74 2e 63 0a 09 24 28 43 |:.cscrip|t.c..$(C|
|00000a40| 43 29 20 2d 6f 20 63 73 | 63 72 69 70 74 20 24 28 |C) -o cs|cript $(|
|00000a50| 43 46 4c 41 47 53 29 20 | 63 73 63 72 69 70 74 2e |CFLAGS) |cscript.|
|00000a60| 63 0a 0a 6d 61 6e 3a 20 | 63 73 63 72 69 70 74 2e |c..man: |cscript.|
|00000a70| 31 0a 09 6e 72 6f 66 66 | 20 2d 6d 61 6e 20 63 73 |1..nroff| -man cs|
|00000a80| 63 72 69 70 74 2e 31 20 | 7c 63 6f 6c 20 3e 6d 61 |cript.1 ||col >ma|
|00000a90| 6e 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |n.......|........|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c00| 70 69 70 65 73 63 72 69 | 70 74 2f 63 73 63 72 69 |pipescri|pt/cscri|
|00000c10| 70 74 2e 31 00 00 00 00 | 00 00 00 00 00 00 00 00 |pt.1....|........|
|00000c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000c70| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000c80| 20 20 20 32 36 33 37 20 | 20 34 34 30 34 33 32 33 | 2637 | 4404323|
|00000c90| 30 31 34 20 20 31 30 30 | 31 36 00 20 00 00 00 00 |014 100|16. ....|
|00000ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e00| 2e 54 48 20 43 53 43 52 | 49 50 54 20 31 6c 0a 2e |.TH CSCR|IPT 1l..|
|00000e10| 53 48 20 4e 41 4d 45 0a | 63 73 63 72 69 70 74 20 |SH NAME.|cscript |
|00000e20| 5c 2d 20 72 65 63 6f 72 | 64 20 61 20 74 65 72 6d |\- recor|d a term|
|00000e30| 69 6e 61 6c 20 73 65 73 | 73 69 6f 6e 0a 2e 53 48 |inal ses|sion..SH|
|00000e40| 20 53 59 4e 4f 50 53 49 | 53 0a 2e 42 20 63 73 63 | SYNOPSI|S..B csc|
|00000e50| 72 69 70 74 20 5b 20 5c | 2d 61 71 20 5d 20 5b 20 |ript [ \|-aq ] [ |
|00000e60| 5c 2d 73 0a 2e 49 20 73 | 68 65 6c 6c 0a 2e 42 20 |\-s..I s|hell..B |
|00000e70| 5d 20 5b 0a 2e 49 20 66 | 69 6c 65 0a 2e 42 20 5d |] [..I f|ile..B ]|
|00000e80| 0a 2e 53 48 20 44 45 53 | 43 52 49 50 54 49 4f 4e |..SH DES|CRIPTION|
|00000e90| 0a 2e 49 20 43 73 63 72 | 69 70 74 0a 72 65 63 6f |..I Cscr|ipt.reco|
|00000ea0| 72 64 73 20 61 6e 20 69 | 6e 74 65 72 61 63 74 69 |rds an i|nteracti|
|00000eb0| 76 65 20 73 65 73 73 69 | 6f 6e 20 69 6e 20 61 20 |ve sessi|on in a |
|00000ec0| 66 69 6c 65 20 61 73 20 | 69 74 20 61 70 70 65 61 |file as |it appea|
|00000ed0| 72 73 20 6f 6e 20 74 68 | 65 20 74 74 79 2e 0a 2e |rs on th|e tty...|
|00000ee0| 50 50 0a 49 66 0a 2e 49 | 20 66 69 6c 65 0a 69 73 |PP.If..I| file.is|
|00000ef0| 20 73 70 65 63 69 66 69 | 65 64 2c 20 74 68 65 20 | specifi|ed, the |
|00000f00| 73 63 72 69 70 74 20 69 | 73 20 72 65 63 6f 72 64 |script i|s record|
|00000f10| 65 64 20 69 6e 0a 2e 49 | 20 66 69 6c 65 2e 0a 4f |ed in..I| file..O|
|00000f20| 74 68 65 72 77 69 73 65 | 2c 20 74 68 65 20 73 65 |therwise|, the se|
|00000f30| 73 73 69 6f 6e 20 69 73 | 20 72 65 63 6f 72 64 65 |ssion is| recorde|
|00000f40| 64 20 69 6e 0a 2e 42 20 | 74 79 70 65 73 63 72 69 |d in..B |typescri|
|00000f50| 70 74 0a 69 6e 20 74 68 | 65 20 63 75 72 72 65 6e |pt.in th|e curren|
|00000f60| 74 20 64 69 72 65 63 74 | 6f 72 79 2e 20 20 0a 54 |t direct|ory. .T|
|00000f70| 68 65 0a 2e 42 20 5c 2d | 73 0a 6f 70 74 69 6f 6e |he..B \-|s.option|
|00000f80| 20 63 61 75 73 65 73 0a | 2e 49 20 73 68 65 6c 6c | causes.|.I shell|
|00000f90| 0a 74 6f 20 62 65 20 75 | 73 65 64 20 69 6e 73 74 |.to be u|sed inst|
|00000fa0| 65 61 64 20 6f 66 20 74 | 68 61 74 20 73 70 65 63 |ead of t|hat spec|
|00000fb0| 69 66 69 65 64 20 62 79 | 20 74 68 65 0a 2e 42 20 |ified by| the..B |
|00000fc0| 53 48 45 4c 4c 0a 65 6e | 76 69 72 6f 6e 6d 65 6e |SHELL.en|vironmen|
|00000fd0| 74 20 76 61 72 69 61 62 | 6c 65 2e 20 20 49 66 0a |t variab|le. If.|
|00000fe0| 2e 42 20 53 48 45 4c 4c | 0a 69 73 20 6e 6f 74 20 |.B SHELL|.is not |
|00000ff0| 64 65 66 69 6e 65 64 2c | 20 74 68 65 20 64 65 66 |defined,| the def|
|00001000| 61 75 6c 74 20 69 73 0a | 2e 42 20 2f 62 69 6e 2f |ault is.|.B /bin/|
|00001010| 73 68 2e 0a 4f 74 68 65 | 72 20 6f 70 74 69 6f 6e |sh..Othe|r option|
|00001020| 73 20 61 6e 64 20 74 68 | 65 69 72 20 61 63 74 69 |s and th|eir acti|
|00001030| 6f 6e 73 20 61 72 65 3a | 0a 2e 54 50 20 22 5c 77 |ons are:|..TP "\w|
|00001040| 27 5c 2d 61 5c 20 5c 20 | 27 75 22 0a 2e 42 20 5c |'\-a\ \ |'u"..B \|
|00001050| 2d 61 0a 41 70 70 65 6e | 64 20 74 6f 20 74 68 65 |-a.Appen|d to the|
|00001060| 20 73 63 72 69 70 74 20 | 66 69 6c 65 2e 20 20 4f | script |file. O|
|00001070| 74 68 65 72 77 69 73 65 | 2c 20 74 68 65 20 66 69 |therwise|, the fi|
|00001080| 6c 65 20 69 73 20 74 72 | 75 6e 63 61 74 65 64 2e |le is tr|uncated.|
|00001090| 0a 2e 54 50 0a 2e 42 20 | 5c 2d 71 0a 51 75 69 65 |..TP..B |\-q.Quie|
|000010a0| 74 20 6d 6f 64 65 2e 20 | 20 44 6f 6e 27 74 20 70 |t mode. | Don't p|
|000010b0| 72 69 6e 74 20 74 68 65 | 20 74 69 6d 65 20 61 6e |rint the| time an|
|000010c0| 64 20 64 61 74 65 20 61 | 74 20 74 68 65 20 62 65 |d date a|t the be|
|000010d0| 67 69 6e 6e 69 6e 67 20 | 61 6e 64 0a 65 6e 64 20 |ginning |and.end |
|000010e0| 6f 66 20 74 68 65 20 73 | 63 72 69 70 74 2e 0a 2e |of the s|cript...|
|000010f0| 50 44 0a 2e 50 50 0a 2e | 53 48 20 46 49 4c 45 53 |PD..PP..|SH FILES|
|00001100| 0a 2e 63 63 20 78 0a 2e | 2f 74 79 70 65 73 63 72 |..cc x..|/typescr|
|00001110| 69 70 74 0a 78 63 63 0a | 2e 53 48 20 53 45 45 20 |ipt.xcc.|.SH SEE |
|00001120| 41 4c 53 4f 0a 73 68 28 | 31 29 2c 20 63 73 68 28 |ALSO.sh(|1), csh(|
|00001130| 31 29 2c 20 6b 73 68 28 | 31 29 20 6f 72 20 77 68 |1), ksh(|1) or wh|
|00001140| 61 74 65 76 65 72 20 79 | 6f 75 20 75 73 65 2e 0a |atever y|ou use..|
|00001150| 2e 53 48 20 44 49 41 47 | 4e 4f 53 54 49 43 53 0a |.SH DIAG|NOSTICS.|
|00001160| 56 61 72 69 6f 75 73 20 | 63 6f 6d 70 6c 61 69 6e |Various |complain|
|00001170| 74 73 20 77 68 65 6e 20 | 5c 66 49 6f 70 65 6e 5c |ts when |\fIopen\|
|00001180| 66 52 28 32 29 2c 20 5c | 66 49 66 6f 72 6b 5c 66 |fR(2), \|fIfork\f|
|00001190| 52 28 32 29 2c 20 5c 66 | 49 65 78 65 63 5c 66 52 |R(2), \f|Iexec\fR|
|000011a0| 28 32 29 2c 0a 6f 72 20 | 5c 66 49 70 69 70 65 5c |(2),.or |\fIpipe\|
|000011b0| 66 52 28 32 29 20 63 61 | 6c 6c 73 20 66 61 69 6c |fR(2) ca|lls fail|
|000011c0| 2e 0a 2e 53 48 20 42 55 | 47 53 0a 55 73 65 72 20 |...SH BU|GS.User |
|000011d0| 69 6e 70 75 74 20 61 6e | 64 20 70 72 6f 67 72 61 |input an|d progra|
|000011e0| 6d 20 6f 75 74 70 75 74 | 20 61 72 65 20 69 6e 74 |m output| are int|
|000011f0| 65 72 63 65 70 74 65 64 | 20 62 79 20 64 69 66 66 |ercepted| by diff|
|00001200| 65 72 65 6e 74 20 70 72 | 6f 63 65 73 73 65 73 3b |erent pr|ocesses;|
|00001210| 0a 74 68 65 79 20 6d 69 | 67 68 74 20 6e 6f 74 20 |.they mi|ght not |
|00001220| 61 70 70 65 61 72 20 69 | 6e 20 74 68 65 20 73 61 |appear i|n the sa|
|00001230| 6d 65 20 6f 72 64 65 72 | 20 69 6e 20 74 68 65 20 |me order| in the |
|00001240| 73 63 72 69 70 74 20 66 | 69 6c 65 20 61 73 20 74 |script f|ile as t|
|00001250| 68 65 79 20 64 69 64 0a | 6f 6e 20 74 68 65 20 74 |hey did.|on the t|
|00001260| 74 79 2e 0a 2e 50 50 0a | 54 68 69 73 20 69 73 20 |ty...PP.|This is |
|00001270| 61 20 67 65 6e 65 72 69 | 63 20 76 65 72 73 69 6f |a generi|c versio|
|00001280| 6e 2c 20 75 73 69 6e 67 | 20 6f 6e 6c 79 20 70 69 |n, using| only pi|
|00001290| 70 65 73 2e 20 20 49 74 | 20 73 68 6f 75 6c 64 20 |pes. It| should |
|000012a0| 77 6f 72 6b 20 6f 6e 0a | 61 6e 79 20 72 65 61 73 |work on.|any reas|
|000012b0| 6f 6e 61 62 6c 65 20 69 | 6d 69 74 61 74 69 6f 6e |onable i|mitation|
|000012c0| 20 6f 66 20 55 6e 69 78 | 2c 20 62 75 74 20 6b 6e | of Unix|, but kn|
|000012d0| 6f 77 73 20 6e 6f 74 68 | 69 6e 67 20 61 62 6f 75 |ows noth|ing abou|
|000012e0| 74 20 73 6f 63 6b 65 74 | 73 2c 0a 53 74 72 65 61 |t socket|s,.Strea|
|000012f0| 6d 73 20 6f 72 20 70 74 | 79 73 2e 20 20 50 72 6f |ms or pt|ys. Pro|
|00001300| 67 72 61 6d 73 20 77 68 | 69 63 68 20 63 61 72 65 |grams wh|ich care|
|00001310| 20 77 68 65 74 68 65 72 | 20 74 68 65 79 20 61 72 | whether| they ar|
|00001320| 65 20 74 61 6c 6b 69 6e | 67 20 74 6f 0a 61 20 74 |e talkin|g to.a t|
|00001330| 74 79 20 6d 69 67 68 74 | 20 6e 6f 74 20 77 6f 72 |ty might| not wor|
|00001340| 6b 20 72 69 67 68 74 2e | 20 20 43 6f 6d 6d 61 6e |k right.| Comman|
|00001350| 64 73 20 6c 69 6b 65 20 | 5c 66 49 70 73 5c 66 52 |ds like |\fIps\fR|
|00001360| 28 31 29 0a 77 68 69 63 | 68 20 63 61 72 65 20 61 |(1).whic|h care a|
|00001370| 62 6f 75 74 20 70 72 6f | 63 65 73 73 20 67 72 6f |bout pro|cess gro|
|00001380| 75 70 73 20 70 72 6f 62 | 61 62 6c 79 20 77 6f 6e |ups prob|ably won|
|00001390| 27 74 20 77 6f 72 6b 20 | 72 69 67 68 74 2e 0a 00 |'t work |right...|
|000013a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001400| 70 69 70 65 73 63 72 69 | 70 74 2f 63 73 63 72 69 |pipescri|pt/cscri|
|00001410| 70 74 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |pt.c....|........|
|00001420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001460| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00001470| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00001480| 20 20 20 35 35 33 31 20 | 20 34 34 30 34 33 32 33 | 5531 | 4404323|
|00001490| 30 31 37 20 20 31 30 30 | 37 37 00 20 00 00 00 00 |017 100|77. ....|
|000014a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001600| 2f 2a 0a 20 2a 20 63 73 | 63 72 69 70 74 20 2d 20 |/*. * cs|cript - |
|00001610| 72 65 63 6f 72 64 20 61 | 20 74 65 72 6d 69 6e 61 |record a| termina|
|00001620| 6c 20 73 65 73 73 69 6f | 6e 0a 20 2a 20 41 75 74 |l sessio|n. * Aut|
|00001630| 68 6f 72 3a 09 47 72 61 | 6e 74 20 44 6f 72 6d 61 |hor:.Gra|nt Dorma|
|00001640| 6e 0a 20 2a 20 4d 6f 64 | 69 66 69 65 64 20 62 79 |n. * Mod|ified by|
|00001650| 20 52 61 79 20 53 77 61 | 72 74 7a 0a 20 2a 20 4d | Ray Swa|rtz. * M|
|00001660| 6f 64 69 66 69 65 64 20 | 62 79 20 4b 65 6e 74 20 |odified |by Kent |
|00001670| 46 6f 72 73 63 68 6d 69 | 65 64 74 20 32 30 6a 75 |Forschmi|edt 20ju|
|00001680| 6e 38 38 0a 20 2a 2f 0a | 23 69 66 6e 64 65 66 20 |n88. */.|#ifndef |
|00001690| 6c 69 6e 74 0a 73 74 61 | 74 69 63 20 63 68 61 72 |lint.sta|tic char|
|000016a0| 20 2a 73 63 63 73 69 64 | 20 3d 20 22 40 28 23 29 | *sccsid| = "@(#)|
|000016b0| 63 73 63 72 69 70 74 2e | 63 09 32 2e 32 20 20 36 |cscript.|c.2.2 6|
|000016c0| 2f 32 30 2f 38 38 22 3b | 0a 23 65 6e 64 69 66 0a |/20/88";|.#endif.|
|000016d0| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |.#includ|e <stdio|
|000016e0| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 69 |.h>.#inc|lude <si|
|000016f0| 67 6e 61 6c 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |gnal.h>.|#include|
|00001700| 20 3c 66 63 6e 74 6c 2e | 68 3e 0a 0a 23 64 65 66 | <fcntl.|h>..#def|
|00001710| 69 6e 65 20 53 48 45 4c | 4c 09 09 22 2f 62 69 6e |ine SHEL|L.."/bin|
|00001720| 2f 73 68 22 0a 23 64 65 | 66 69 6e 65 20 53 43 52 |/sh".#de|fine SCR|
|00001730| 49 50 54 4f 55 54 09 22 | 74 79 70 65 73 63 72 69 |IPTOUT."|typescri|
|00001740| 70 74 22 0a 23 64 65 66 | 69 6e 65 20 53 48 46 4c |pt".#def|ine SHFL|
|00001750| 41 47 53 09 09 22 2d 69 | 22 0a 0a 76 6f 69 64 20 |AGS.."-i|"..void |
|00001760| 65 78 69 74 28 29 2c 20 | 70 65 72 72 6f 72 28 29 |exit(), |perror()|
|00001770| 3b 0a 0a 63 68 61 72 20 | 2a 67 65 74 65 6e 76 28 |;..char |*getenv(|
|00001780| 29 2c 20 2a 63 74 69 6d | 65 28 29 3b 0a 0a 69 6e |), *ctim|e();..in|
|00001790| 74 20 66 64 3b 09 09 09 | 09 2f 2a 20 72 65 63 6f |t fd;...|./* reco|
|000017a0| 72 64 20 66 69 6c 65 20 | 2a 2f 0a 63 68 61 72 20 |rd file |*/.char |
|000017b0| 62 75 66 5b 42 55 46 53 | 49 5a 5d 3b 0a 63 68 61 |buf[BUFS|IZ];.cha|
|000017c0| 72 20 2a 66 6e 61 6d 65 | 3b 0a 63 68 61 72 20 2a |r *fname|;.char *|
|000017d0| 73 68 65 6c 6c 3b 0a 69 | 6e 74 20 71 66 6c 67 3b |shell;.i|nt qflg;|
|000017e0| 0a 69 6e 74 20 69 70 64 | 5b 32 5d 2c 20 6f 70 64 |.int ipd|[2], opd|
|000017f0| 5b 32 5d 3b 09 2f 2a 20 | 70 69 70 65 73 20 2a 2f |[2];./* |pipes */|
|00001800| 0a 0a 6d 61 69 6e 28 61 | 72 67 63 2c 20 61 72 67 |..main(a|rgc, arg|
|00001810| 76 29 0a 69 6e 74 20 61 | 72 67 63 3b 20 63 68 61 |v).int a|rgc; cha|
|00001820| 72 20 2a 2a 61 72 67 76 | 3b 0a 7b 0a 09 69 6e 74 |r **argv|;.{..int|
|00001830| 20 67 65 74 6f 70 74 28 | 29 3b 0a 09 65 78 74 65 | getopt(|);..exte|
|00001840| 72 6e 20 63 68 61 72 20 | 2a 6f 70 74 61 72 67 3b |rn char |*optarg;|
|00001850| 0a 09 65 78 74 65 72 6e | 20 69 6e 74 20 6f 70 74 |..extern| int opt|
|00001860| 69 6e 64 3b 0a 0a 09 69 | 6e 74 20 63 2c 20 6f 66 |ind;...i|nt c, of|
|00001870| 6c 61 67 73 3b 0a 0a 09 | 6f 66 6c 61 67 73 20 3d |lags;...|oflags =|
|00001880| 20 4f 5f 57 52 4f 4e 4c | 59 20 2b 20 4f 5f 43 52 | O_WRONL|Y + O_CR|
|00001890| 45 41 54 20 2b 20 4f 5f | 54 52 55 4e 43 3b 0a 09 |EAT + O_|TRUNC;..|
|000018a0| 73 68 65 6c 6c 20 3d 20 | 28 63 68 61 72 20 2a 29 |shell = |(char *)|
|000018b0| 30 3b 0a 0a 09 77 68 69 | 6c 65 20 28 28 63 20 3d |0;...whi|le ((c =|
|000018c0| 20 67 65 74 6f 70 74 28 | 61 72 67 63 2c 20 61 72 | getopt(|argc, ar|
|000018d0| 67 76 2c 20 22 61 71 73 | 3a 22 29 29 20 21 3d 20 |gv, "aqs|:")) != |
|000018e0| 45 4f 46 29 0a 09 09 73 | 77 69 74 63 68 28 63 29 |EOF)...s|witch(c)|
|000018f0| 20 7b 0a 09 09 09 63 61 | 73 65 20 27 61 27 3a 09 | {....ca|se 'a':.|
|00001900| 2f 2a 20 61 70 70 65 6e | 64 20 6d 6f 64 65 20 2a |/* appen|d mode *|
|00001910| 2f 0a 09 09 09 09 6f 66 | 6c 61 67 73 20 3d 20 4f |/.....of|lags = O|
|00001920| 5f 57 52 4f 4e 4c 59 20 | 2b 20 4f 5f 43 52 45 41 |_WRONLY |+ O_CREA|
|00001930| 54 20 2b 20 4f 5f 41 50 | 50 45 4e 44 3b 0a 09 09 |T + O_AP|PEND;...|
|00001940| 09 09 62 72 65 61 6b 3b | 0a 09 09 09 63 61 73 65 |..break;|....case|
|00001950| 20 27 71 27 3a 09 2f 2a | 20 71 75 69 65 74 20 6d | 'q':./*| quiet m|
|00001960| 6f 64 65 20 2a 2f 0a 09 | 09 09 09 71 66 6c 67 2b |ode */..|...qflg+|
|00001970| 2b 3b 0a 09 09 09 09 62 | 72 65 61 6b 3b 0a 09 09 |+;.....b|reak;...|
|00001980| 09 63 61 73 65 20 27 73 | 27 3a 0a 09 09 09 09 73 |.case 's|':.....s|
|00001990| 68 65 6c 6c 20 3d 20 6f | 70 74 61 72 67 3b 0a 09 |hell = o|ptarg;..|
|000019a0| 09 09 09 62 72 65 61 6b | 3b 0a 09 09 09 64 65 66 |...break|;....def|
|000019b0| 61 75 6c 74 3a 0a 09 09 | 09 09 66 70 72 69 6e 74 |ault:...|..fprint|
|000019c0| 66 28 73 74 64 65 72 72 | 2c 20 22 55 73 61 67 65 |f(stderr|, "Usage|
|000019d0| 3a 20 63 73 63 72 69 70 | 74 20 5b 2d 61 71 5d 20 |: cscrip|t [-aq] |
|000019e0| 5b 20 2d 73 20 73 68 65 | 6c 6c 20 5d 20 5b 66 69 |[ -s she|ll ] [fi|
|000019f0| 6c 65 5d 5c 6e 22 29 3b | 0a 09 09 09 09 65 78 69 |le]\n");|.....exi|
|00001a00| 74 28 33 29 3b 0a 09 09 | 7d 0a 0a 09 69 66 20 28 |t(3);...|}...if (|
|00001a10| 21 73 68 65 6c 6c 20 26 | 26 20 28 73 68 65 6c 6c |!shell &|& (shell|
|00001a20| 20 3d 20 67 65 74 65 6e | 76 28 22 53 48 45 4c 4c | = geten|v("SHELL|
|00001a30| 22 29 29 20 3d 3d 20 28 | 63 68 61 72 20 2a 29 30 |")) == (|char *)0|
|00001a40| 29 0a 09 09 73 68 65 6c | 6c 20 3d 20 53 48 45 4c |)...shel|l = SHEL|
|00001a50| 4c 3b 0a 0a 09 66 6e 61 | 6d 65 20 3d 20 28 6f 70 |L;...fna|me = (op|
|00001a60| 74 69 6e 64 20 3c 20 61 | 72 67 63 29 20 3f 20 61 |tind < a|rgc) ? a|
|00001a70| 72 67 76 5b 6f 70 74 69 | 6e 64 5d 20 3a 20 53 43 |rgv[opti|nd] : SC|
|00001a80| 52 49 50 54 4f 55 54 3b | 0a 09 69 66 20 28 20 28 |RIPTOUT;|..if ( (|
|00001a90| 66 64 20 3d 20 6f 70 65 | 6e 28 66 6e 61 6d 65 2c |fd = ope|n(fname,|
|00001aa0| 20 6f 66 6c 61 67 73 2c | 20 30 36 36 36 29 29 20 | oflags,| 0666)) |
|00001ab0| 3c 20 30 29 20 7b 0a 09 | 09 70 65 72 72 6f 72 28 |< 0) {..|.perror(|
|00001ac0| 22 63 73 63 72 69 70 74 | 3a 20 6f 70 65 6e 22 29 |"cscript|: open")|
|00001ad0| 3b 0a 09 09 65 78 69 74 | 28 34 29 3b 0a 09 7d 0a |;...exit|(4);..}.|
|00001ae0| 0a 09 69 66 20 28 70 69 | 70 65 28 69 70 64 29 20 |..if (pi|pe(ipd) |
|00001af0| 3d 3d 20 2d 31 29 20 7b | 0a 09 09 70 65 72 72 6f |== -1) {|...perro|
|00001b00| 72 28 22 63 73 63 72 69 | 70 74 3a 20 70 69 70 65 |r("cscri|pt: pipe|
|00001b10| 22 29 3b 0a 09 09 65 78 | 69 74 28 32 29 3b 0a 09 |");...ex|it(2);..|
|00001b20| 7d 0a 09 69 66 20 28 70 | 69 70 65 28 6f 70 64 29 |}..if (p|ipe(opd)|
|00001b30| 20 3d 3d 20 2d 31 29 20 | 7b 0a 09 09 70 65 72 72 | == -1) |{...perr|
|00001b40| 6f 72 28 22 63 73 63 72 | 69 70 74 3a 20 70 69 70 |or("cscr|ipt: pip|
|00001b50| 65 22 29 3b 0a 09 09 65 | 78 69 74 28 32 29 3b 0a |e");...e|xit(2);.|
|00001b60| 09 7d 0a 0a 09 73 77 69 | 74 63 68 28 66 6f 72 6b |.}...swi|tch(fork|
|00001b70| 28 29 29 20 7b 0a 09 09 | 63 61 73 65 20 2d 31 3a |()) {...|case -1:|
|00001b80| 20 70 65 72 72 6f 72 28 | 22 63 73 63 72 69 70 74 | perror(|"cscript|
|00001b90| 3a 20 66 6f 72 6b 20 31 | 22 29 3b 20 65 78 69 74 |: fork 1|"); exit|
|00001ba0| 28 31 29 3b 0a 0a 09 09 | 63 61 73 65 20 30 3a 20 |(1);....|case 0: |
|00001bb0| 73 77 69 74 63 68 28 66 | 6f 72 6b 28 29 29 20 7b |switch(f|ork()) {|
|00001bc0| 0a 09 09 09 63 61 73 65 | 20 2d 31 3a 09 70 65 72 |....case| -1:.per|
|00001bd0| 72 6f 72 28 22 63 73 63 | 72 69 70 74 3a 20 66 6f |ror("csc|ript: fo|
|00001be0| 72 6b 20 32 22 29 3b 20 | 65 78 69 74 28 31 29 3b |rk 2"); |exit(1);|
|00001bf0| 0a 0a 09 09 09 63 61 73 | 65 20 30 3a 09 09 64 6f |.....cas|e 0:..do|
|00001c00| 5f 73 74 64 69 6e 28 29 | 3b 20 65 78 69 74 28 36 |_stdin()|; exit(6|
|00001c10| 29 3b 0a 09 09 09 64 65 | 66 61 75 6c 74 3a 09 64 |);....de|fault:.d|
|00001c20| 6f 5f 73 68 65 6c 6c 28 | 29 3b 20 65 78 69 74 28 |o_shell(|); exit(|
|00001c30| 36 29 3b 0a 09 09 7d 0a | 09 09 64 65 66 61 75 6c |6);...}.|..defaul|
|00001c40| 74 3a 09 64 6f 5f 73 74 | 64 6f 75 74 28 29 3b 20 |t:.do_st|dout(); |
|00001c50| 65 78 69 74 28 36 29 3b | 0a 09 7d 0a 0a 09 2f 2a |exit(6);|..}.../*|
|00001c60| 20 4e 4f 54 52 45 41 43 | 48 45 44 20 2a 2f 0a 7d | NOTREAC|HED */.}|
|00001c70| 0a 0a 0a 64 6f 5f 73 74 | 64 6f 75 74 28 29 0a 7b |...do_st|dout().{|
|00001c80| 0a 09 75 6e 73 69 67 6e | 65 64 20 6e 72 65 61 64 |..unsign|ed nread|
|00001c90| 3b 0a 09 6c 6f 6e 67 20 | 74 69 6d 65 28 29 2c 20 |;..long |time(), |
|00001ca0| 74 6c 6f 63 3b 0a 0a 09 | 2f 2a 20 74 68 69 73 20 |tloc;...|/* this |
|00001cb0| 70 72 6f 63 65 73 73 20 | 77 69 6c 6c 20 65 78 69 |process |will exi|
|00001cc0| 74 20 77 68 65 6e 20 74 | 68 65 20 70 69 70 65 20 |t when t|he pipe |
|00001cd0| 63 6c 6f 73 65 73 20 2a | 2f 0a 09 73 69 67 6e 61 |closes *|/..signa|
|00001ce0| 6c 28 53 49 47 48 55 50 | 2c 20 53 49 47 5f 49 47 |l(SIGHUP|, SIG_IG|
|00001cf0| 4e 29 3b 20 2f 2a 20 2a | 2f 0a 09 73 69 67 6e 61 |N); /* *|/..signa|
|00001d00| 6c 28 53 49 47 49 4e 54 | 2c 20 53 49 47 5f 49 47 |l(SIGINT|, SIG_IG|
|00001d10| 4e 29 3b 20 2f 2a 20 2a | 2f 0a 09 73 69 67 6e 61 |N); /* *|/..signa|
|00001d20| 6c 28 53 49 47 51 55 49 | 54 2c 20 53 49 47 5f 49 |l(SIGQUI|T, SIG_I|
|00001d30| 47 4e 29 3b 20 2f 2a 20 | 2a 2f 0a 0a 09 63 6c 6f |GN); /* |*/...clo|
|00001d40| 73 65 28 69 70 64 5b 30 | 5d 29 3b 20 63 6c 6f 73 |se(ipd[0|]); clos|
|00001d50| 65 28 69 70 64 5b 31 5d | 29 3b 0a 0a 09 63 6c 6f |e(ipd[1]|);...clo|
|00001d60| 73 65 28 30 29 3b 20 64 | 75 70 28 6f 70 64 5b 30 |se(0); d|up(opd[0|
|00001d70| 5d 29 3b 0a 09 63 6c 6f | 73 65 28 6f 70 64 5b 30 |]);..clo|se(opd[0|
|00001d80| 5d 29 3b 20 63 6c 6f 73 | 65 28 6f 70 64 5b 31 5d |]); clos|e(opd[1]|
|00001d90| 29 3b 0a 0a 09 66 70 72 | 69 6e 74 66 28 73 74 64 |);...fpr|intf(std|
|00001da0| 65 72 72 2c 20 22 52 65 | 63 6f 72 64 69 6e 67 2e |err, "Re|cording.|
|00001db0| 2e 2e 5c 6e 45 78 69 74 | 20 73 68 65 6c 6c 20 74 |..\nExit| shell t|
|00001dc0| 6f 20 73 74 6f 70 5c 6e | 22 29 3b 0a 0a 09 77 68 |o stop\n|");...wh|
|00001dd0| 69 6c 65 28 28 6e 72 65 | 61 64 20 3d 20 72 65 61 |ile((nre|ad = rea|
|00001de0| 64 28 30 2c 20 62 75 66 | 2c 20 73 69 7a 65 6f 66 |d(0, buf|, sizeof|
|00001df0| 20 62 75 66 29 29 20 21 | 3d 20 30 29 20 7b 0a 09 | buf)) !|= 0) {..|
|00001e00| 09 77 72 69 74 65 28 31 | 2c 20 62 75 66 2c 20 6e |.write(1|, buf, n|
|00001e10| 72 65 61 64 29 3b 0a 09 | 09 77 72 69 74 65 28 66 |read);..|.write(f|
|00001e20| 64 2c 20 62 75 66 2c 20 | 6e 72 65 61 64 29 3b 0a |d, buf, |nread);.|
|00001e30| 09 7d 0a 0a 09 69 66 20 | 28 21 71 66 6c 67 29 20 |.}...if |(!qflg) |
|00001e40| 7b 0a 09 09 74 69 6d 65 | 28 26 74 6c 6f 63 29 3b |{...time|(&tloc);|
|00001e50| 0a 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |...fprin|tf(stder|
|00001e60| 72 2c 20 22 53 63 72 69 | 70 74 20 64 6f 6e 65 2c |r, "Scri|pt done,|
|00001e70| 20 66 69 6c 65 20 69 73 | 20 25 73 5c 6e 22 2c 20 | file is| %s\n", |
|00001e80| 66 6e 61 6d 65 29 3b 0a | 09 09 73 70 72 69 6e 74 |fname);.|..sprint|
|00001e90| 66 28 62 75 66 2c 20 22 | 5c 6e 53 63 72 69 70 74 |f(buf, "|\nScript|
|00001ea0| 20 64 6f 6e 65 20 25 73 | 22 2c 20 63 74 69 6d 65 | done %s|", ctime|
|00001eb0| 28 26 74 6c 6f 63 29 29 | 3b 0a 09 09 77 72 69 74 |(&tloc))|;...writ|
|00001ec0| 65 28 66 64 2c 20 62 75 | 66 2c 20 28 75 6e 73 69 |e(fd, bu|f, (unsi|
|00001ed0| 67 6e 65 64 29 20 73 74 | 72 6c 65 6e 28 62 75 66 |gned) st|rlen(buf|
|00001ee0| 29 29 3b 0a 09 7d 0a 0a | 09 65 78 69 74 28 30 29 |));..}..|.exit(0)|
|00001ef0| 3b 0a 7d 0a 0a 64 6f 5f | 73 74 64 69 6e 28 29 0a |;.}..do_|stdin().|
|00001f00| 7b 0a 09 75 6e 73 69 67 | 6e 65 64 20 6e 72 65 61 |{..unsig|ned nrea|
|00001f10| 64 3b 0a 0a 09 63 6c 6f | 73 65 28 6f 70 64 5b 30 |d;...clo|se(opd[0|
|00001f20| 5d 29 3b 20 63 6c 6f 73 | 65 28 6f 70 64 5b 31 5d |]); clos|e(opd[1]|
|00001f30| 29 3b 0a 09 63 6c 6f 73 | 65 28 31 29 3b 20 64 75 |);..clos|e(1); du|
|00001f40| 70 28 69 70 64 5b 31 5d | 29 3b 0a 09 63 6c 6f 73 |p(ipd[1]|);..clos|
|00001f50| 65 28 69 70 64 5b 30 5d | 29 3b 20 63 6c 6f 73 65 |e(ipd[0]|); close|
|00001f60| 28 69 70 64 5b 31 5d 29 | 3b 0a 0a 09 77 68 69 6c |(ipd[1])|;...whil|
|00001f70| 65 28 28 6e 72 65 61 64 | 20 3d 20 72 65 61 64 28 |e((nread| = read(|
|00001f80| 30 2c 20 62 75 66 2c 20 | 73 69 7a 65 6f 66 20 62 |0, buf, |sizeof b|
|00001f90| 75 66 29 29 20 21 3d 20 | 30 29 20 7b 0a 09 09 77 |uf)) != |0) {...w|
|00001fa0| 72 69 74 65 28 66 64 2c | 20 62 75 66 2c 20 6e 72 |rite(fd,| buf, nr|
|00001fb0| 65 61 64 29 3b 0a 09 09 | 77 72 69 74 65 28 31 2c |ead);...|write(1,|
|00001fc0| 20 62 75 66 2c 20 6e 72 | 65 61 64 29 3b 0a 09 7d | buf, nr|ead);..}|
|00001fd0| 0a 0a 09 65 78 69 74 28 | 30 29 3b 0a 7d 0a 0a 64 |...exit(|0);.}..d|
|00001fe0| 6f 5f 73 68 65 6c 6c 28 | 29 0a 7b 0a 09 6c 6f 6e |o_shell(|).{..lon|
|00001ff0| 67 20 74 69 6d 65 28 29 | 2c 20 74 6c 6f 63 3b 0a |g time()|, tloc;.|
|00002000| 0a 09 63 6c 6f 73 65 28 | 30 29 3b 20 64 75 70 28 |..close(|0); dup(|
|00002010| 69 70 64 5b 30 5d 29 3b | 0a 09 63 6c 6f 73 65 28 |ipd[0]);|..close(|
|00002020| 31 29 3b 20 64 75 70 28 | 6f 70 64 5b 31 5d 29 3b |1); dup(|opd[1]);|
|00002030| 0a 09 2f 2a 20 6d 75 73 | 68 20 73 74 64 65 72 72 |../* mus|h stderr|
|00002040| 20 69 6e 74 6f 20 73 74 | 64 6f 75 74 20 70 69 70 | into st|dout pip|
|00002050| 65 20 2a 2f 0a 09 63 6c | 6f 73 65 28 32 29 3b 20 |e */..cl|ose(2); |
|00002060| 64 75 70 28 6f 70 64 5b | 31 5d 29 3b 0a 0a 09 63 |dup(opd[|1]);...c|
|00002070| 6c 6f 73 65 28 6f 70 64 | 5b 30 5d 29 3b 20 63 6c |lose(opd|[0]); cl|
|00002080| 6f 73 65 28 6f 70 64 5b | 31 5d 29 3b 0a 09 63 6c |ose(opd[|1]);..cl|
|00002090| 6f 73 65 28 69 70 64 5b | 30 5d 29 3b 20 63 6c 6f |ose(ipd[|0]); clo|
|000020a0| 73 65 28 69 70 64 5b 31 | 5d 29 3b 0a 09 63 6c 6f |se(ipd[1|]);..clo|
|000020b0| 73 65 28 66 64 29 3b 0a | 0a 09 69 66 20 28 21 71 |se(fd);.|..if (!q|
|000020c0| 66 6c 67 29 20 7b 0a 09 | 09 74 69 6d 65 28 26 74 |flg) {..|.time(&t|
|000020d0| 6c 6f 63 29 3b 0a 09 09 | 66 70 72 69 6e 74 66 28 |loc);...|fprintf(|
|000020e0| 73 74 64 65 72 72 2c 20 | 22 53 63 72 69 70 74 20 |stderr, |"Script |
|000020f0| 73 74 61 72 74 65 64 20 | 25 73 22 2c 20 63 74 69 |started |%s", cti|
|00002100| 6d 65 28 26 74 6c 6f 63 | 29 29 3b 0a 09 7d 0a 0a |me(&tloc|));..}..|
|00002110| 09 65 78 65 63 6c 28 73 | 68 65 6c 6c 2c 20 73 68 |.execl(s|hell, sh|
|00002120| 65 6c 6c 2c 20 53 48 46 | 4c 41 47 53 2c 20 30 29 |ell, SHF|LAGS, 0)|
|00002130| 3b 0a 09 70 65 72 72 6f | 72 28 22 63 73 63 72 69 |;..perro|r("cscri|
|00002140| 70 74 3a 20 65 78 65 63 | 6c 22 29 3b 0a 09 65 78 |pt: exec|l");..ex|
|00002150| 69 74 28 35 29 3b 0a 7d | 0a 0a 0a 76 6f 69 64 20 |it(5);.}|...void |
|00002160| 65 78 69 74 28 29 2c 20 | 70 65 72 72 6f 72 28 29 |exit(), |perror()|
|00002170| 3b 0a 0a 63 68 61 72 20 | 2a 67 65 74 65 6e 76 28 |;..char |*getenv(|
|00002180| 29 2c 20 2a 63 74 69 6d | 65 28 29 3b 0a 0a 69 6e |), *ctim|e();..in|
|00002190| 74 20 66 64 3b 09 09 09 | 09 2f 2a 20 72 65 63 6f |t fd;...|./* reco|
|000021a0| 72 64 20 66 69 6c 65 20 | 2a 2f 0a 63 68 61 72 20 |rd file |*/.char |
|000021b0| 62 75 66 5b 42 55 46 53 | 49 5a 5d 3b 0a 63 68 61 |buf[BUFS|IZ];.cha|
|000021c0| 72 20 2a 66 6e 61 6d 65 | 3b 0a 63 68 61 72 20 2a |r *fname|;.char *|
|000021d0| 73 68 65 6c 6c 3b 0a 69 | 6e 74 20 71 66 6c 67 3b |shell;.i|nt qflg;|
|000021e0| 0a 69 6e 74 20 69 70 64 | 5b 32 5d 2c 20 6f 70 64 |.int ipd|[2], opd|
|000021f0| 5b 32 5d 3b 09 2f 2a 20 | 70 69 70 65 73 20 2a 2f |[2];./* |pipes */|
|00002200| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002600| 68 69 6e 6b 20 49 20 67 | 6f 74 20 74 68 65 20 6f |hink I g|ot the o|
|00002610| 72 69 67 69 6e 61 6c 20 | 66 72 6f 6d 20 55 6e 69 |riginal |from Uni|
|00002620| 78 2f 57 6f 72 6c 64 20 | 6d 61 67 61 7a 69 6e 65 |x/World |magazine|
|00002630| 2c 20 61 6e 64 20 49 20 | 6d 61 64 65 0a 69 74 20 |, and I |made.it |
|00002640| 77 6f 72 6b 20 61 20 6c | 6f 74 20 62 65 74 74 65 |work a l|ot bette|
|00002650| 72 20 61 6e 64 20 67 61 | 76 65 20 69 74 20 61 20 |r and ga|ve it a |
|00002660| 6d 61 6e 20 70 61 67 65 | 2e 0a 0a 49 20 64 6f 6e |man page|...I don|
|00002670| 27 74 20 6b 6e 6f 77 20 | 69 66 20 6f 6e 65 20 6c |'t know |if one l|
|00002680| 69 6b 65 20 74 68 69 73 | 20 68 61 73 20 62 65 65 |ike this| has bee|
|00002690| 6e 20 70 6f 73 74 65 64 | 20 62 65 66 6f 72 65 2e |n posted| before.|
|000026a0| 0a 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002800| 70 69 70 65 73 63 72 69 | 70 74 2f 4d 61 6b 65 66 |pipescri|pt/Makef|
|00002810| 69 6c 65 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ile.....|........|
|00002820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00002870| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00002880| 20 20 20 20 32 32 32 20 | 20 34 34 30 34 33 32 33 | 222 | 4404323|
|00002890| 30 31 33 20 20 20 37 36 | 37 30 00 20 00 00 00 00 |013 76|70. ....|
|000028a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a00| 23 0a 23 20 4d 61 6b 65 | 66 69 6c 65 20 66 6f 72 |#.# Make|file for|
|00002a10| 20 63 73 63 72 69 70 74 | 0a 23 0a 61 6c 6c 3a 20 | cscript|.#.all: |
|00002a20| 63 73 63 72 69 70 74 0a | 0a 63 73 63 72 69 70 74 |cscript.|.cscript|
|00002a30| 3a 09 63 73 63 72 69 70 | 74 2e 63 0a 09 24 28 43 |:.cscrip|t.c..$(C|
|00002a40| 43 29 20 2d 6f 20 63 73 | 63 72 69 70 74 20 24 28 |C) -o cs|cript $(|
|00002a50| 43 46 4c 41 47 53 29 20 | 63 73 63 72 69 70 74 2e |CFLAGS) |cscript.|
|00002a60| 63 0a 0a 6d 61 6e 3a 20 | 63 73 63 72 69 70 74 2e |c..man: |cscript.|
|00002a70| 31 0a 09 6e 72 6f 66 66 | 20 2d 6d 61 6e 20 63 73 |1..nroff| -man cs|
|00002a80| 63 72 69 70 74 2e 31 20 | 7c 63 6f 6c 20 3e 6d 61 |cript.1 ||col >ma|
|00002a90| 6e 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |n.......|........|
|00002aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c00| 70 69 70 65 73 63 72 69 | 70 74 2f 63 73 63 72 69 |pipescri|pt/cscri|
|00002c10| 70 74 2e 31 00 00 00 00 | 00 00 00 00 00 00 00 00 |pt.1....|........|
|00002c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00002c70| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00002c80| 20 20 20 32 36 33 37 20 | 20 34 34 30 34 33 32 33 | 2637 | 4404323|
|00002c90| 30 31 34 20 20 31 30 30 | 31 36 00 20 00 00 00 00 |014 100|16. ....|
|00002ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e00| 2e 54 48 20 43 53 43 52 | 49 50 54 20 31 6c 0a 2e |.TH CSCR|IPT 1l..|
|00002e10| 53 48 20 4e 41 4d 45 0a | 63 73 63 72 69 70 74 20 |SH NAME.|cscript |
|00002e20| 5c 2d 20 72 65 63 6f 72 | 64 20 61 20 74 65 72 6d |\- recor|d a term|
|00002e30| 69 6e 61 6c 20 73 65 73 | 73 69 6f 6e 0a 2e 53 48 |inal ses|sion..SH|
|00002e40| 20 53 59 4e 4f 50 53 49 | 53 0a 2e 42 20 63 73 63 | SYNOPSI|S..B csc|
|00002e50| 72 69 70 74 20 5b 20 5c | 2d 61 71 20 5d 20 5b 20 |ript [ \|-aq ] [ |
|00002e60| 5c 2d 73 0a 2e 49 20 73 | 68 65 6c 6c 0a 2e 42 20 |\-s..I s|hell..B |
|00002e70| 5d 20 5b 0a 2e 49 20 66 | 69 6c 65 0a 2e 42 20 5d |] [..I f|ile..B ]|
|00002e80| 0a 2e 53 48 20 44 45 53 | 43 52 49 50 54 49 4f 4e |..SH DES|CRIPTION|
|00002e90| 0a 2e 49 20 43 73 63 72 | 69 70 74 0a 72 65 63 6f |..I Cscr|ipt.reco|
|00002ea0| 72 64 73 20 61 6e 20 69 | 6e 74 65 72 61 63 74 69 |rds an i|nteracti|
|00002eb0| 76 65 20 73 65 73 73 69 | 6f 6e 20 69 6e 20 61 20 |ve sessi|on in a |
|00002ec0| 66 69 6c 65 20 61 73 20 | 69 74 20 61 70 70 65 61 |file as |it appea|
|00002ed0| 72 73 20 6f 6e 20 74 68 | 65 20 74 74 79 2e 0a 2e |rs on th|e tty...|
|00002ee0| 50 50 0a 49 66 0a 2e 49 | 20 66 69 6c 65 0a 69 73 |PP.If..I| file.is|
|00002ef0| 20 73 70 65 63 69 66 69 | 65 64 2c 20 74 68 65 20 | specifi|ed, the |
|00002f00| 73 63 72 69 70 74 20 69 | 73 20 72 65 63 6f 72 64 |script i|s record|
|00002f10| 65 64 20 69 6e 0a 2e 49 | 20 66 69 6c 65 2e 0a 4f |ed in..I| file..O|
|00002f20| 74 68 65 72 77 69 73 65 | 2c 20 74 68 65 20 73 65 |therwise|, the se|
|00002f30| 73 73 69 6f 6e 20 69 73 | 20 72 65 63 6f 72 64 65 |ssion is| recorde|
|00002f40| 64 20 69 6e 0a 2e 42 20 | 74 79 70 65 73 63 72 69 |d in..B |typescri|
|00002f50| 70 74 0a 69 6e 20 74 68 | 65 20 63 75 72 72 65 6e |pt.in th|e curren|
|00002f60| 74 20 64 69 72 65 63 74 | 6f 72 79 2e 20 20 0a 54 |t direct|ory. .T|
|00002f70| 68 65 0a 2e 42 20 5c 2d | 73 0a 6f 70 74 69 6f 6e |he..B \-|s.option|
|00002f80| 20 63 61 75 73 65 73 0a | 2e 49 20 73 68 65 6c 6c | causes.|.I shell|
|00002f90| 0a 74 6f 20 62 65 20 75 | 73 65 64 20 69 6e 73 74 |.to be u|sed inst|
|00002fa0| 65 61 64 20 6f 66 20 74 | 68 61 74 20 73 70 65 63 |ead of t|hat spec|
|00002fb0| 69 66 69 65 64 20 62 79 | 20 74 68 65 0a 2e 42 20 |ified by| the..B |
|00002fc0| 53 48 45 4c 4c 0a 65 6e | 76 69 72 6f 6e 6d 65 6e |SHELL.en|vironmen|
|00002fd0| 74 20 76 61 72 69 61 62 | 6c 65 2e 20 20 49 66 0a |t variab|le. If.|
|00002fe0| 2e 42 20 53 48 45 4c 4c | 0a 69 73 20 6e 6f 74 20 |.B SHELL|.is not |
|00002ff0| 64 65 66 69 6e 65 64 2c | 20 74 68 65 20 64 65 66 |defined,| the def|
|00003000| 61 75 6c 74 20 69 73 0a | 2e 42 20 2f 62 69 6e 2f |ault is.|.B /bin/|
|00003010| 73 68 2e 0a 4f 74 68 65 | 72 20 6f 70 74 69 6f 6e |sh..Othe|r option|
|00003020| 73 20 61 6e 64 20 74 68 | 65 69 72 20 61 63 74 69 |s and th|eir acti|
|00003030| 6f 6e 73 20 61 72 65 3a | 0a 2e 54 50 20 22 5c 77 |ons are:|..TP "\w|
|00003040| 27 5c 2d 61 5c 20 5c 20 | 27 75 22 0a 2e 42 20 5c |'\-a\ \ |'u"..B \|
|00003050| 2d 61 0a 41 70 70 65 6e | 64 20 74 6f 20 74 68 65 |-a.Appen|d to the|
|00003060| 20 73 63 72 69 70 74 20 | 66 69 6c 65 2e 20 20 4f | script |file. O|
|00003070| 74 68 65 72 77 69 73 65 | 2c 20 74 68 65 20 66 69 |therwise|, the fi|
|00003080| 6c 65 20 69 73 20 74 72 | 75 6e 63 61 74 65 64 2e |le is tr|uncated.|
|00003090| 0a 2e 54 50 0a 2e 42 20 | 5c 2d 71 0a 51 75 69 65 |..TP..B |\-q.Quie|
|000030a0| 74 20 6d 6f 64 65 2e 20 | 20 44 6f 6e 27 74 20 70 |t mode. | Don't p|
|000030b0| 72 69 6e 74 20 74 68 65 | 20 74 69 6d 65 20 61 6e |rint the| time an|
|000030c0| 64 20 64 61 74 65 20 61 | 74 20 74 68 65 20 62 65 |d date a|t the be|
|000030d0| 67 69 6e 6e 69 6e 67 20 | 61 6e 64 0a 65 6e 64 20 |ginning |and.end |
|000030e0| 6f 66 20 74 68 65 20 73 | 63 72 69 70 74 2e 0a 2e |of the s|cript...|
|000030f0| 50 44 0a 2e 50 50 0a 2e | 53 48 20 46 49 4c 45 53 |PD..PP..|SH FILES|
|00003100| 0a 2e 63 63 20 78 0a 2e | 2f 74 79 70 65 73 63 72 |..cc x..|/typescr|
|00003110| 69 70 74 0a 78 63 63 0a | 2e 53 48 20 53 45 45 20 |ipt.xcc.|.SH SEE |
|00003120| 41 4c 53 4f 0a 73 68 28 | 31 29 2c 20 63 73 68 28 |ALSO.sh(|1), csh(|
|00003130| 31 29 2c 20 6b 73 68 28 | 31 29 20 6f 72 20 77 68 |1), ksh(|1) or wh|
|00003140| 61 74 65 76 65 72 20 79 | 6f 75 20 75 73 65 2e 0a |atever y|ou use..|
|00003150| 2e 53 48 20 44 49 41 47 | 4e 4f 53 54 49 43 53 0a |.SH DIAG|NOSTICS.|
|00003160| 56 61 72 69 6f 75 73 20 | 63 6f 6d 70 6c 61 69 6e |Various |complain|
|00003170| 74 73 20 77 68 65 6e 20 | 5c 66 49 6f 70 65 6e 5c |ts when |\fIopen\|
|00003180| 66 52 28 32 29 2c 20 5c | 66 49 66 6f 72 6b 5c 66 |fR(2), \|fIfork\f|
|00003190| 52 28 32 29 2c 20 5c 66 | 49 65 78 65 63 5c 66 52 |R(2), \f|Iexec\fR|
|000031a0| 28 32 29 2c 0a 6f 72 20 | 5c 66 49 70 69 70 65 5c |(2),.or |\fIpipe\|
|000031b0| 66 52 28 32 29 20 63 61 | 6c 6c 73 20 66 61 69 6c |fR(2) ca|lls fail|
|000031c0| 2e 0a 2e 53 48 20 42 55 | 47 53 0a 55 73 65 72 20 |...SH BU|GS.User |
|000031d0| 69 6e 70 75 74 20 61 6e | 64 20 70 72 6f 67 72 61 |input an|d progra|
|000031e0| 6d 20 6f 75 74 70 75 74 | 20 61 72 65 20 69 6e 74 |m output| are int|
|000031f0| 65 72 63 65 70 74 65 64 | 20 62 79 20 64 69 66 66 |ercepted| by diff|
|00003200| 65 72 65 6e 74 20 70 72 | 6f 63 65 73 73 65 73 3b |erent pr|ocesses;|
|00003210| 0a 74 68 65 79 20 6d 69 | 67 68 74 20 6e 6f 74 20 |.they mi|ght not |
|00003220| 61 70 70 65 61 72 20 69 | 6e 20 74 68 65 20 73 61 |appear i|n the sa|
|00003230| 6d 65 20 6f 72 64 65 72 | 20 69 6e 20 74 68 65 20 |me order| in the |
|00003240| 73 63 72 69 70 74 20 66 | 69 6c 65 20 61 73 20 74 |script f|ile as t|
|00003250| 68 65 79 20 64 69 64 0a | 6f 6e 20 74 68 65 20 74 |hey did.|on the t|
|00003260| 74 79 2e 0a 2e 50 50 0a | 54 68 69 73 20 69 73 20 |ty...PP.|This is |
|00003270| 61 20 67 65 6e 65 72 69 | 63 20 76 65 72 73 69 6f |a generi|c versio|
|00003280| 6e 2c 20 75 73 69 6e 67 | 20 6f 6e 6c 79 20 70 69 |n, using| only pi|
|00003290| 70 65 73 2e 20 20 49 74 | 20 73 68 6f 75 6c 64 20 |pes. It| should |
|000032a0| 77 6f 72 6b 20 6f 6e 0a | 61 6e 79 20 72 65 61 73 |work on.|any reas|
|000032b0| 6f 6e 61 62 6c 65 20 69 | 6d 69 74 61 74 69 6f 6e |onable i|mitation|
|000032c0| 20 6f 66 20 55 6e 69 78 | 2c 20 62 75 74 20 6b 6e | of Unix|, but kn|
|000032d0| 6f 77 73 20 6e 6f 74 68 | 69 6e 67 20 61 62 6f 75 |ows noth|ing abou|
|000032e0| 74 20 73 6f 63 6b 65 74 | 73 2c 0a 53 74 72 65 61 |t socket|s,.Strea|
|000032f0| 6d 73 20 6f 72 20 70 74 | 79 73 2e 20 20 50 72 6f |ms or pt|ys. Pro|
|00003300| 67 72 61 6d 73 20 77 68 | 69 63 68 20 63 61 72 65 |grams wh|ich care|
|00003310| 20 77 68 65 74 68 65 72 | 20 74 68 65 79 20 61 72 | whether| they ar|
|00003320| 65 20 74 61 6c 6b 69 6e | 67 20 74 6f 0a 61 20 74 |e talkin|g to.a t|
|00003330| 74 79 20 6d 69 67 68 74 | 20 6e 6f 74 20 77 6f 72 |ty might| not wor|
|00003340| 6b 20 72 69 67 68 74 2e | 20 20 43 6f 6d 6d 61 6e |k right.| Comman|
|00003350| 64 73 20 6c 69 6b 65 20 | 5c 66 49 70 73 5c 66 52 |ds like |\fIps\fR|
|00003360| 28 31 29 0a 77 68 69 63 | 68 20 63 61 72 65 20 61 |(1).whic|h care a|
|00003370| 62 6f 75 74 20 70 72 6f | 63 65 73 73 20 67 72 6f |bout pro|cess gro|
|00003380| 75 70 73 20 70 72 6f 62 | 61 62 6c 79 20 77 6f 6e |ups prob|ably won|
|00003390| 27 74 20 77 6f 72 6b 20 | 72 69 67 68 74 2e 0a 00 |'t work |right...|
|000033a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003400| 70 69 70 65 73 63 72 69 | 70 74 2f 63 73 63 72 69 |pipescri|pt/cscri|
|00003410| 70 74 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |pt.c....|........|
|00003420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003460| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00003470| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00003480| 20 20 20 35 35 33 31 20 | 20 34 34 30 34 33 32 33 | 5531 | 4404323|
|00003490| 30 31 37 20 20 31 30 30 | 37 37 00 20 00 00 00 00 |017 100|77. ....|
|000034a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003600| 2f 2a 0a 20 2a 20 63 73 | 63 72 69 70 74 20 2d 20 |/*. * cs|cript - |
|00003610| 72 65 63 6f 72 64 20 61 | 20 74 65 72 6d 69 6e 61 |record a| termina|
|00003620| 6c 20 73 65 73 73 69 6f | 6e 0a 20 2a 20 41 75 74 |l sessio|n. * Aut|
|00003630| 68 6f 72 3a 09 47 72 61 | 6e 74 20 44 6f 72 6d 61 |hor:.Gra|nt Dorma|
|00003640| 6e 0a 20 2a 20 4d 6f 64 | 69 66 69 65 64 20 62 79 |n. * Mod|ified by|
|00003650| 20 52 61 79 20 53 77 61 | 72 74 7a 0a 20 2a 20 4d | Ray Swa|rtz. * M|
|00003660| 6f 64 69 66 69 65 64 20 | 62 79 20 4b 65 6e 74 20 |odified |by Kent |
|00003670| 46 6f 72 73 63 68 6d 69 | 65 64 74 20 32 30 6a 75 |Forschmi|edt 20ju|
|00003680| 6e 38 38 0a 20 2a 2f 0a | 23 69 66 6e 64 65 66 20 |n88. */.|#ifndef |
|00003690| 6c 69 6e 74 0a 73 74 61 | 74 69 63 20 63 68 61 72 |lint.sta|tic char|
|000036a0| 20 2a 73 63 63 73 69 64 | 20 3d 20 22 40 28 23 29 | *sccsid| = "@(#)|
|000036b0| 63 73 63 72 69 70 74 2e | 63 09 32 2e 32 20 20 36 |cscript.|c.2.2 6|
|000036c0| 2f 32 30 2f 38 38 22 3b | 0a 23 65 6e 64 69 66 0a |/20/88";|.#endif.|
|000036d0| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |.#includ|e <stdio|
|000036e0| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 69 |.h>.#inc|lude <si|
|000036f0| 67 6e 61 6c 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |gnal.h>.|#include|
|00003700| 20 3c 66 63 6e 74 6c 2e | 68 3e 0a 0a 23 64 65 66 | <fcntl.|h>..#def|
|00003710| 69 6e 65 20 53 48 45 4c | 4c 09 09 22 2f 62 69 6e |ine SHEL|L.."/bin|
|00003720| 2f 73 68 22 0a 23 64 65 | 66 69 6e 65 20 53 43 52 |/sh".#de|fine SCR|
|00003730| 49 50 54 4f 55 54 09 22 | 74 79 70 65 73 63 72 69 |IPTOUT."|typescri|
|00003740| 70 74 22 0a 23 64 65 66 | 69 6e 65 20 53 48 46 4c |pt".#def|ine SHFL|
|00003750| 41 47 53 09 09 22 2d 69 | 22 0a 0a 76 6f 69 64 20 |AGS.."-i|"..void |
|00003760| 65 78 69 74 28 29 2c 20 | 70 65 72 72 6f 72 28 29 |exit(), |perror()|
|00003770| 3b 0a 0a 63 68 61 72 20 | 2a 67 65 74 65 6e 76 28 |;..char |*getenv(|
|00003780| 29 2c 20 2a 63 74 69 6d | 65 28 29 3b 0a 0a 69 6e |), *ctim|e();..in|
|00003790| 74 20 66 64 3b 09 09 09 | 09 2f 2a 20 72 65 63 6f |t fd;...|./* reco|
|000037a0| 72 64 20 66 69 6c 65 20 | 2a 2f 0a 63 68 61 72 20 |rd file |*/.char |
|000037b0| 62 75 66 5b 42 55 46 53 | 49 5a 5d 3b 0a 63 68 61 |buf[BUFS|IZ];.cha|
|000037c0| 72 20 2a 66 6e 61 6d 65 | 3b 0a 63 68 61 72 20 2a |r *fname|;.char *|
|000037d0| 73 68 65 6c 6c 3b 0a 69 | 6e 74 20 71 66 6c 67 3b |shell;.i|nt qflg;|
|000037e0| 0a 69 6e 74 20 69 70 64 | 5b 32 5d 2c 20 6f 70 64 |.int ipd|[2], opd|
|000037f0| 5b 32 5d 3b 09 2f 2a 20 | 70 69 70 65 73 20 2a 2f |[2];./* |pipes */|
|00003800| 0a 0a 6d 61 69 6e 28 61 | 72 67 63 2c 20 61 72 67 |..main(a|rgc, arg|
|00003810| 76 29 0a 69 6e 74 20 61 | 72 67 63 3b 20 63 68 61 |v).int a|rgc; cha|
|00003820| 72 20 2a 2a 61 72 67 76 | 3b 0a 7b 0a 09 69 6e 74 |r **argv|;.{..int|
|00003830| 20 67 65 74 6f 70 74 28 | 29 3b 0a 09 65 78 74 65 | getopt(|);..exte|
|00003840| 72 6e 20 63 68 61 72 20 | 2a 6f 70 74 61 72 67 3b |rn char |*optarg;|
|00003850| 0a 09 65 78 74 65 72 6e | 20 69 6e 74 20 6f 70 74 |..extern| int opt|
|00003860| 69 6e 64 3b 0a 0a 09 69 | 6e 74 20 63 2c 20 6f 66 |ind;...i|nt c, of|
|00003870| 6c 61 67 73 3b 0a 0a 09 | 6f 66 6c 61 67 73 20 3d |lags;...|oflags =|
|00003880| 20 4f 5f 57 52 4f 4e 4c | 59 20 2b 20 4f 5f 43 52 | O_WRONL|Y + O_CR|
|00003890| 45 41 54 20 2b 20 4f 5f | 54 52 55 4e 43 3b 0a 09 |EAT + O_|TRUNC;..|
|000038a0| 73 68 65 6c 6c 20 3d 20 | 28 63 68 61 72 20 2a 29 |shell = |(char *)|
|000038b0| 30 3b 0a 0a 09 77 68 69 | 6c 65 20 28 28 63 20 3d |0;...whi|le ((c =|
|000038c0| 20 67 65 74 6f 70 74 28 | 61 72 67 63 2c 20 61 72 | getopt(|argc, ar|
|000038d0| 67 76 2c 20 22 61 71 73 | 3a 22 29 29 20 21 3d 20 |gv, "aqs|:")) != |
|000038e0| 45 4f 46 29 0a 09 09 73 | 77 69 74 63 68 28 63 29 |EOF)...s|witch(c)|
|000038f0| 20 7b 0a 09 09 09 63 61 | 73 65 20 27 61 27 3a 09 | {....ca|se 'a':.|
|00003900| 2f 2a 20 61 70 70 65 6e | 64 20 6d 6f 64 65 20 2a |/* appen|d mode *|
|00003910| 2f 0a 09 09 09 09 6f 66 | 6c 61 67 73 20 3d 20 4f |/.....of|lags = O|
|00003920| 5f 57 52 4f 4e 4c 59 20 | 2b 20 4f 5f 43 52 45 41 |_WRONLY |+ O_CREA|
|00003930| 54 20 2b 20 4f 5f 41 50 | 50 45 4e 44 3b 0a 09 09 |T + O_AP|PEND;...|
|00003940| 09 09 62 72 65 61 6b 3b | 0a 09 09 09 63 61 73 65 |..break;|....case|
|00003950| 20 27 71 27 3a 09 2f 2a | 20 71 75 69 65 74 20 6d | 'q':./*| quiet m|
|00003960| 6f 64 65 20 2a 2f 0a 09 | 09 09 09 71 66 6c 67 2b |ode */..|...qflg+|
|00003970| 2b 3b 0a 09 09 09 09 62 | 72 65 61 6b 3b 0a 09 09 |+;.....b|reak;...|
|00003980| 09 63 61 73 65 20 27 73 | 27 3a 0a 09 09 09 09 73 |.case 's|':.....s|
|00003990| 68 65 6c 6c 20 3d 20 6f | 70 74 61 72 67 3b 0a 09 |hell = o|ptarg;..|
|000039a0| 09 09 09 62 72 65 61 6b | 3b 0a 09 09 09 64 65 66 |...break|;....def|
|000039b0| 61 75 6c 74 3a 0a 09 09 | 09 09 66 70 72 69 6e 74 |ault:...|..fprint|
|000039c0| 66 28 73 74 64 65 72 72 | 2c 20 22 55 73 61 67 65 |f(stderr|, "Usage|
|000039d0| 3a 20 63 73 63 72 69 70 | 74 20 5b 2d 61 71 5d 20 |: cscrip|t [-aq] |
|000039e0| 5b 20 2d 73 20 73 68 65 | 6c 6c 20 5d 20 5b 66 69 |[ -s she|ll ] [fi|
|000039f0| 6c 65 5d 5c 6e 22 29 3b | 0a 09 09 09 09 65 78 69 |le]\n");|.....exi|
|00003a00| 74 28 33 29 3b 0a 09 09 | 7d 0a 0a 09 69 66 20 28 |t(3);...|}...if (|
|00003a10| 21 73 68 65 6c 6c 20 26 | 26 20 28 73 68 65 6c 6c |!shell &|& (shell|
|00003a20| 20 3d 20 67 65 74 65 6e | 76 28 22 53 48 45 4c 4c | = geten|v("SHELL|
|00003a30| 22 29 29 20 3d 3d 20 28 | 63 68 61 72 20 2a 29 30 |")) == (|char *)0|
|00003a40| 29 0a 09 09 73 68 65 6c | 6c 20 3d 20 53 48 45 4c |)...shel|l = SHEL|
|00003a50| 4c 3b 0a 0a 09 66 6e 61 | 6d 65 20 3d 20 28 6f 70 |L;...fna|me = (op|
|00003a60| 74 69 6e 64 20 3c 20 61 | 72 67 63 29 20 3f 20 61 |tind < a|rgc) ? a|
|00003a70| 72 67 76 5b 6f 70 74 69 | 6e 64 5d 20 3a 20 53 43 |rgv[opti|nd] : SC|
|00003a80| 52 49 50 54 4f 55 54 3b | 0a 09 69 66 20 28 20 28 |RIPTOUT;|..if ( (|
|00003a90| 66 64 20 3d 20 6f 70 65 | 6e 28 66 6e 61 6d 65 2c |fd = ope|n(fname,|
|00003aa0| 20 6f 66 6c 61 67 73 2c | 20 30 36 36 36 29 29 20 | oflags,| 0666)) |
|00003ab0| 3c 20 30 29 20 7b 0a 09 | 09 70 65 72 72 6f 72 28 |< 0) {..|.perror(|
|00003ac0| 22 63 73 63 72 69 70 74 | 3a 20 6f 70 65 6e 22 29 |"cscript|: open")|
|00003ad0| 3b 0a 09 09 65 78 69 74 | 28 34 29 3b 0a 09 7d 0a |;...exit|(4);..}.|
|00003ae0| 0a 09 69 66 20 28 70 69 | 70 65 28 69 70 64 29 20 |..if (pi|pe(ipd) |
|00003af0| 3d 3d 20 2d 31 29 20 7b | 0a 09 09 70 65 72 72 6f |== -1) {|...perro|
|00003b00| 72 28 22 63 73 63 72 69 | 70 74 3a 20 70 69 70 65 |r("cscri|pt: pipe|
|00003b10| 22 29 3b 0a 09 09 65 78 | 69 74 28 32 29 3b 0a 09 |");...ex|it(2);..|
|00003b20| 7d 0a 09 69 66 20 28 70 | 69 70 65 28 6f 70 64 29 |}..if (p|ipe(opd)|
|00003b30| 20 3d 3d 20 2d 31 29 20 | 7b 0a 09 09 70 65 72 72 | == -1) |{...perr|
|00003b40| 6f 72 28 22 63 73 63 72 | 69 70 74 3a 20 70 69 70 |or("cscr|ipt: pip|
|00003b50| 65 22 29 3b 0a 09 09 65 | 78 69 74 28 32 29 3b 0a |e");...e|xit(2);.|
|00003b60| 09 7d 0a 0a 09 73 77 69 | 74 63 68 28 66 6f 72 6b |.}...swi|tch(fork|
|00003b70| 28 29 29 20 7b 0a 09 09 | 63 61 73 65 20 2d 31 3a |()) {...|case -1:|
|00003b80| 20 70 65 72 72 6f 72 28 | 22 63 73 63 72 69 70 74 | perror(|"cscript|
|00003b90| 3a 20 66 6f 72 6b 20 31 | 22 29 3b 20 65 78 69 74 |: fork 1|"); exit|
|00003ba0| 28 31 29 3b 0a 0a 09 09 | 63 61 73 65 20 30 3a 20 |(1);....|case 0: |
|00003bb0| 73 77 69 74 63 68 28 66 | 6f 72 6b 28 29 29 20 7b |switch(f|ork()) {|
|00003bc0| 0a 09 09 09 63 61 73 65 | 20 2d 31 3a 09 70 65 72 |....case| -1:.per|
|00003bd0| 72 6f 72 28 22 63 73 63 | 72 69 70 74 3a 20 66 6f |ror("csc|ript: fo|
|00003be0| 72 6b 20 32 22 29 3b 20 | 65 78 69 74 28 31 29 3b |rk 2"); |exit(1);|
|00003bf0| 0a 0a 09 09 09 63 61 73 | 65 20 30 3a 09 09 64 6f |.....cas|e 0:..do|
|00003c00| 5f 73 74 64 69 6e 28 29 | 3b 20 65 78 69 74 28 36 |_stdin()|; exit(6|
|00003c10| 29 3b 0a 09 09 09 64 65 | 66 61 75 6c 74 3a 09 64 |);....de|fault:.d|
|00003c20| 6f 5f 73 68 65 6c 6c 28 | 29 3b 20 65 78 69 74 28 |o_shell(|); exit(|
|00003c30| 36 29 3b 0a 09 09 7d 0a | 09 09 64 65 66 61 75 6c |6);...}.|..defaul|
|00003c40| 74 3a 09 64 6f 5f 73 74 | 64 6f 75 74 28 29 3b 20 |t:.do_st|dout(); |
|00003c50| 65 78 69 74 28 36 29 3b | 0a 09 7d 0a 0a 09 2f 2a |exit(6);|..}.../*|
|00003c60| 20 4e 4f 54 52 45 41 43 | 48 45 44 20 2a 2f 0a 7d | NOTREAC|HED */.}|
|00003c70| 0a 0a 0a 64 6f 5f 73 74 | 64 6f 75 74 28 29 0a 7b |...do_st|dout().{|
|00003c80| 0a 09 75 6e 73 69 67 6e | 65 64 20 6e 72 65 61 64 |..unsign|ed nread|
|00003c90| 3b 0a 09 6c 6f 6e 67 20 | 74 69 6d 65 28 29 2c 20 |;..long |time(), |
|00003ca0| 74 6c 6f 63 3b 0a 0a 09 | 2f 2a 20 74 68 69 73 20 |tloc;...|/* this |
|00003cb0| 70 72 6f 63 65 73 73 20 | 77 69 6c 6c 20 65 78 69 |process |will exi|
|00003cc0| 74 20 77 68 65 6e 20 74 | 68 65 20 70 69 70 65 20 |t when t|he pipe |
|00003cd0| 63 6c 6f 73 65 73 20 2a | 2f 0a 09 73 69 67 6e 61 |closes *|/..signa|
|00003ce0| 6c 28 53 49 47 48 55 50 | 2c 20 53 49 47 5f 49 47 |l(SIGHUP|, SIG_IG|
|00003cf0| 4e 29 3b 20 2f 2a 20 2a | 2f 0a 09 73 69 67 6e 61 |N); /* *|/..signa|
|00003d00| 6c 28 53 49 47 49 4e 54 | 2c 20 53 49 47 5f 49 47 |l(SIGINT|, SIG_IG|
|00003d10| 4e 29 3b 20 2f 2a 20 2a | 2f 0a 09 73 69 67 6e 61 |N); /* *|/..signa|
|00003d20| 6c 28 53 49 47 51 55 49 | 54 2c 20 53 49 47 5f 49 |l(SIGQUI|T, SIG_I|
|00003d30| 47 4e 29 3b 20 2f 2a 20 | 2a 2f 0a 0a 09 63 6c 6f |GN); /* |*/...clo|
|00003d40| 73 65 28 69 70 64 5b 30 | 5d 29 3b 20 63 6c 6f 73 |se(ipd[0|]); clos|
|00003d50| 65 28 69 70 64 5b 31 5d | 29 3b 0a 0a 09 63 6c 6f |e(ipd[1]|);...clo|
|00003d60| 73 65 28 30 29 3b 20 64 | 75 70 28 6f 70 64 5b 30 |se(0); d|up(opd[0|
|00003d70| 5d 29 3b 0a 09 63 6c 6f | 73 65 28 6f 70 64 5b 30 |]);..clo|se(opd[0|
|00003d80| 5d 29 3b 20 63 6c 6f 73 | 65 28 6f 70 64 5b 31 5d |]); clos|e(opd[1]|
|00003d90| 29 3b 0a 0a 09 66 70 72 | 69 6e 74 66 28 73 74 64 |);...fpr|intf(std|
|00003da0| 65 72 72 2c 20 22 52 65 | 63 6f 72 64 69 6e 67 2e |err, "Re|cording.|
|00003db0| 2e 2e 5c 6e 45 78 69 74 | 20 73 68 65 6c 6c 20 74 |..\nExit| shell t|
|00003dc0| 6f 20 73 74 6f 70 5c 6e | 22 29 3b 0a 0a 09 77 68 |o stop\n|");...wh|
|00003dd0| 69 6c 65 28 28 6e 72 65 | 61 64 20 3d 20 72 65 61 |ile((nre|ad = rea|
|00003de0| 64 28 30 2c 20 62 75 66 | 2c 20 73 69 7a 65 6f 66 |d(0, buf|, sizeof|
|00003df0| 20 62 75 66 29 29 20 21 | 3d 20 30 29 20 7b 0a 09 | buf)) !|= 0) {..|
|00003e00| 09 77 72 69 74 65 28 31 | 2c 20 62 75 66 2c 20 6e |.write(1|, buf, n|
|00003e10| 72 65 61 64 29 3b 0a 09 | 09 77 72 69 74 65 28 66 |read);..|.write(f|
|00003e20| 64 2c 20 62 75 66 2c 20 | 6e 72 65 61 64 29 3b 0a |d, buf, |nread);.|
|00003e30| 09 7d 0a 0a 09 69 66 20 | 28 21 71 66 6c 67 29 20 |.}...if |(!qflg) |
|00003e40| 7b 0a 09 09 74 69 6d 65 | 28 26 74 6c 6f 63 29 3b |{...time|(&tloc);|
|00003e50| 0a 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |...fprin|tf(stder|
|00003e60| 72 2c 20 22 53 63 72 69 | 70 74 20 64 6f 6e 65 2c |r, "Scri|pt done,|
|00003e70| 20 66 69 6c 65 20 69 73 | 20 25 73 5c 6e 22 2c 20 | file is| %s\n", |
|00003e80| 66 6e 61 6d 65 29 3b 0a | 09 09 73 70 72 69 6e 74 |fname);.|..sprint|
|00003e90| 66 28 62 75 66 2c 20 22 | 5c 6e 53 63 72 69 70 74 |f(buf, "|\nScript|
|00003ea0| 20 64 6f 6e 65 20 25 73 | 22 2c 20 63 74 69 6d 65 | done %s|", ctime|
|00003eb0| 28 26 74 6c 6f 63 29 29 | 3b 0a 09 09 77 72 69 74 |(&tloc))|;...writ|
|00003ec0| 65 28 66 64 2c 20 62 75 | 66 2c 20 28 75 6e 73 69 |e(fd, bu|f, (unsi|
|00003ed0| 67 6e 65 64 29 20 73 74 | 72 6c 65 6e 28 62 75 66 |gned) st|rlen(buf|
|00003ee0| 29 29 3b 0a 09 7d 0a 0a | 09 65 78 69 74 28 30 29 |));..}..|.exit(0)|
|00003ef0| 3b 0a 7d 0a 0a 64 6f 5f | 73 74 64 69 6e 28 29 0a |;.}..do_|stdin().|
|00003f00| 7b 0a 09 75 6e 73 69 67 | 6e 65 64 20 6e 72 65 61 |{..unsig|ned nrea|
|00003f10| 64 3b 0a 0a 09 63 6c 6f | 73 65 28 6f 70 64 5b 30 |d;...clo|se(opd[0|
|00003f20| 5d 29 3b 20 63 6c 6f 73 | 65 28 6f 70 64 5b 31 5d |]); clos|e(opd[1]|
|00003f30| 29 3b 0a 09 63 6c 6f 73 | 65 28 31 29 3b 20 64 75 |);..clos|e(1); du|
|00003f40| 70 28 69 70 64 5b 31 5d | 29 3b 0a 09 63 6c 6f 73 |p(ipd[1]|);..clos|
|00003f50| 65 28 69 70 64 5b 30 5d | 29 3b 20 63 6c 6f 73 65 |e(ipd[0]|); close|
|00003f60| 28 69 70 64 5b 31 5d 29 | 3b 0a 0a 09 77 68 69 6c |(ipd[1])|;...whil|
|00003f70| 65 28 28 6e 72 65 61 64 | 20 3d 20 72 65 61 64 28 |e((nread| = read(|
|00003f80| 30 2c 20 62 75 66 2c 20 | 73 69 7a 65 6f 66 20 62 |0, buf, |sizeof b|
|00003f90| 75 66 29 29 20 21 3d 20 | 30 29 20 7b 0a 09 09 77 |uf)) != |0) {...w|
|00003fa0| 72 69 74 65 28 66 64 2c | 20 62 75 66 2c 20 6e 72 |rite(fd,| buf, nr|
|00003fb0| 65 61 64 29 3b 0a 09 09 | 77 72 69 74 65 28 31 2c |ead);...|write(1,|
|00003fc0| 20 62 75 66 2c 20 6e 72 | 65 61 64 29 3b 0a 09 7d | buf, nr|ead);..}|
|00003fd0| 0a 0a 09 65 78 69 74 28 | 30 29 3b 0a 7d 0a 0a 64 |...exit(|0);.}..d|
|00003fe0| 6f 5f 73 68 65 6c 6c 28 | 29 0a 7b 0a 09 6c 6f 6e |o_shell(|).{..lon|
|00003ff0| 67 20 74 69 6d 65 28 29 | 2c 20 74 6c 6f 63 3b 0a |g time()|, tloc;.|
+--------+-------------------------+-------------------------+--------+--------+