DataMuseum.dk

Presents historical artifacts from the history of:

RC9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: a

⟦19ea1d998⟧

    Length: 6862 (0x1ace)
    Names: »awk.1«

Derivation

└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
    └─⟦bbf173f5c⟧ »0004« 
        └─⟦this⟧ »./usr/man/cat1/awk.1« 

Default Hex Dump

0x0000…0020 0a 0a 0a 5f 08 4f 5f 08 6e 5f 08 6c 5f 08 69 5f 08 6e 5f 08 65 20 5f 08 4d 5f 08 61 5f 08 6e 5f   ┆   _ O_ n_ l_ i_ n_ e _ M_ a_ n_┆
0x0020…0040 08 75 5f 08 61 5f 08 6c 20 20 20 20 20 20 20 20 20 20 20 20 20 55 73 65 72 20 43 6f 6d 6d 61 6e   ┆ u_ a_ l             User Comman┆
0x0040…0060 64 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 77 6b 28 31 29 0a 0a 0a 0a   ┆ds                    awk(1)    ┆
0x0060…0080 4e 08 4e 08 4e 08 4e 41 08 41 08 41 08 41 4d 08 4d 08 4d 08 4d 45 08 45 08 45 08 45 0a 20 20 20   ┆N N N NA A A AM M M ME E E E    ┆
0x0080…00a0 20 20 61 77 6b 20 2d 20 70 61 74 74 65 72 6e 20 73 63 61 6e 6e 69 6e 67 20 61 6e 64 20 70 72 6f   ┆  awk - pattern scanning and pro┆
0x00a0…00c0 63 65 73 73 69 6e 67 20 6c 61 6e 67 75 61 67 65 0a 0a 53 08 53 08 53 08 53 59 08 59 08 59 08 59   ┆cessing language  S S S SY Y Y Y┆
0x00c0…00e0 4e 08 4e 08 4e 08 4e 54 08 54 08 54 08 54 41 08 41 08 41 08 41 58 08 58 08 58 08 58 0a 20 20 20   ┆N N N NT T T TA A A AX X X X    ┆
0x00e0…0100 20 20 61 08 61 08 61 08 61 77 08 77 08 77 08 77 6b 08 6b 08 6b 08 6b 20 5b 20 2d 08 2d 08 2d 08   ┆  a a a aw w w wk k k k [ - - - ┆
0x0100…0120 2d 46 08 46 08 46 08 46 5f 08 63 20 5d 20 5b 20 70 72 6f 67 20 5d 20 5b 2d 08 2d 08 2d 08 2d 66   ┆-F F F F_ c ] [ prog ] [- - - -f┆
0x0120…0140 08 66 08 66 08 66 20 66 69 6c 65 20 5d 20 2e 2e 2e 0a 0a 44 08 44 08 44 08 44 45 08 45 08 45 08   ┆ f f f file ] ...  D D D DE E E ┆
0x0140…0160 45 53 08 53 08 53 08 53 43 08 43 08 43 08 43 52 08 52 08 52 08 52 49 08 49 08 49 08 49 50 08 50   ┆ES S S SC C C CR R R RI I I IP P┆
0x0160…0180 08 50 08 50 54 08 54 08 54 08 54 49 08 49 08 49 08 49 4f 08 4f 08 4f 08 4f 4e 08 4e 08 4e 08 4e   ┆ P PT T T TI I I IO O O ON N N N┆
0x0180…01a0 0a 20 20 20 20 20 5f 08 61 5f 08 77 5f 08 6b 20 73 63 61 6e 73 20 65 61 63 68 20 69 6e 70 75 74   ┆      _ a_ w_ k scans each input┆
0x01a0…01c0 20 5f 08 66 5f 08 69 5f 08 6c 5f 08 65 20 66 6f 72 20 6c 69 6e 65 73 20 74 68 61 74 20 6d 61 74   ┆ _ f_ i_ l_ e for lines that mat┆
0x01c0…01e0 63 68 20 61 6e 79 20 6f 66 20 61 20 73 65 74 0a 20 20 20 20 20 6f 66 20 70 61 74 74 65 72 6e 73   ┆ch any of a set      of patterns┆
0x01e0…0200 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 5f 08 70 5f 08 72 5f 08 6f 5f 08 67 2e 20 20 57 69 74   ┆ specified in _ p_ r_ o_ g.  Wit┆
0x0200…0220 68 20 65 61 63 68 20 70 61 74 74 65 72 6e 20 69 6e 20 5f 08 70 5f 08 72 5f 08 6f 5f 08 67 0a 20   ┆h each pattern in _ p_ r_ o_ g  ┆
0x0220…0240 20 20 20 20 74 68 65 72 65 20 63 61 6e 20 62 65 20 61 6e 20 61 73 73 6f 63 69 61 74 65 64 20 61   ┆    there can be an associated a┆
0x0240…0260 63 74 69 6f 6e 20 74 68 61 74 20 77 69 6c 6c 20 62 65 20 70 65 72 66 6f 72 6d 65 64 0a 20 20 20   ┆ction that will be performed    ┆
0x0260…0280 20 20 77 68 65 6e 20 61 20 6c 69 6e 65 20 6f 66 20 61 20 5f 08 66 5f 08 69 5f 08 6c 5f 08 65 20   ┆  when a line of a _ f_ i_ l_ e ┆
0x0280…02a0 6d 61 74 63 68 65 73 20 74 68 65 20 70 61 74 74 65 72 6e 2e 20 20 54 68 65 20 73 65 74 20 6f 66   ┆matches the pattern.  The set of┆
0x02a0…02c0 20 70 61 74 2d 0a 20 20 20 20 20 74 65 72 6e 73 20 6d 61 79 20 61 70 70 65 61 72 20 6c 69 74 65   ┆ pat-      terns may appear lite┆
0x02c0…02e0 72 61 6c 6c 79 20 61 73 20 5f 08 70 5f 08 72 5f 08 6f 5f 08 67 2c 20 6f 72 20 69 6e 20 61 20 66   ┆rally as _ p_ r_ o_ g, or in a f┆
0x02e0…0300 69 6c 65 20 73 70 65 63 69 66 69 65 64 0a 20 20 20 20 20 61 73 20 2d 08 2d 08 2d 08 2d 66 08 66   ┆ile specified      as - - - -f f┆
0x0300…0320 08 66 08 66 20 5f 08 66 5f 08 69 5f 08 6c 5f 08 65 2e 0a 0a 20 20 20 20 20 46 69 6c 65 73 20 61   ┆ f f _ f_ i_ l_ e.       Files a┆
0x0320…0340 72 65 20 72 65 61 64 20 69 6e 20 6f 72 64 65 72 3b 20 69 66 20 74 68 65 72 65 20 61 72 65 20 6e   ┆re read in order; if there are n┆
0x0340…0360 6f 20 66 69 6c 65 73 2c 20 74 68 65 20 73 74 61 6e 64 61 72 64 0a 20 20 20 20 20 69 6e 70 75 74   ┆o files, the standard      input┆
0x0360…0380 20 69 73 20 72 65 61 64 2e 20 20 54 68 65 20 66 69 6c 65 20 6e 61 6d 65 20 60 2d 27 20 6d 65 61   ┆ is read.  The file name `-' mea┆
0x0380…03a0 6e 73 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 69 6e 70 75 74 2e 0a 20 20 20 20 20 45 61 63 68   ┆ns the standard input.      Each┆
0x03a0…03c0 20 6c 69 6e 65 20 69 73 20 6d 61 74 63 68 65 64 20 61 67 61 69 6e 73 74 20 74 68 65 20 70 61 74   ┆ line is matched against the pat┆
0x03c0…03e0 74 65 72 6e 20 70 6f 72 74 69 6f 6e 20 6f 66 20 65 76 65 72 79 0a 20 20 20 20 20 70 61 74 74 65   ┆tern portion of every      patte┆
0x03e0…0400 72 6e 2d 61 63 74 69 6f 6e 20 73 74 61 74 65 6d 65 6e 74 3b 20 74 68 65 20 61 73 73 6f 63 69 61   ┆rn-action statement; the associa┆
0x0400…0420 74 65 64 20 61 63 74 69 6f 6e 20 69 73 20 70 65 72 66 6f 72 6d 65 64 0a 20 20 20 20 20 66 6f 72   ┆ted action is performed      for┆
0x0420…0440 20 65 61 63 68 20 6d 61 74 63 68 65 64 20 70 61 74 74 65 72 6e 2e 0a 0a 20 20 20 20 20 41 6e 20   ┆ each matched pattern.       An ┆
0x0440…0460 69 6e 70 75 74 20 6c 69 6e 65 20 69 73 20 6d 61 64 65 20 75 70 20 6f 66 20 66 69 65 6c 64 73 20   ┆input line is made up of fields ┆
0x0460…0480 73 65 70 61 72 61 74 65 64 20 62 79 20 77 68 69 74 65 20 73 70 61 63 65 2e 0a 20 20 20 20 20 28   ┆separated by white space.      (┆
0x0480…04a0 54 68 69 73 20 64 65 66 61 75 6c 74 20 63 61 6e 20 62 65 20 63 68 61 6e 67 65 64 20 62 79 20 75   ┆This default can be changed by u┆
0x04a0…04c0 73 69 6e 67 20 46 53 2c 20 5f 08 76 5f 08 69 5f 08 64 5f 08 65 20 5f 08 69 5f 08 6e 5f 08 66 5f   ┆sing FS, _ v_ i_ d_ e _ i_ n_ f_┆
0x04c0…04e0 08 72 5f 08 61 2e 29 20 54 68 65 0a 20 20 20 20 20 66 69 65 6c 64 73 20 61 72 65 20 64 65 6e 6f   ┆ r_ a.) The      fields are deno┆
0x04e0…0500 74 65 64 20 24 31 2c 20 24 32 2c 20 2e 2e 2e 20 3b 20 24 30 20 72 65 66 65 72 73 20 74 6f 20 74   ┆ted $1, $2, ... ; $0 refers to t┆
0x0500…0520 68 65 20 65 6e 74 69 72 65 0a 20 20 20 20 20 6c 69 6e 65 2e 0a 0a 20 20 20 20 20 41 20 70 61 74   ┆he entire      line.       A pat┆
0x0520…0540 74 65 72 6e 2d 61 63 74 69 6f 6e 20 73 74 61 74 65 6d 65 6e 74 20 68 61 73 20 74 68 65 20 66 6f   ┆tern-action statement has the fo┆
0x0540…0560 72 6d 0a 0a 20 20 20 20 20 20 20 20 20 20 70 61 74 74 65 72 6e 20 7b 20 61 63 74 69 6f 6e 20 7d   ┆rm            pattern { action }┆
0x0560…0580 0a 0a 20 20 20 20 20 41 20 6d 69 73 73 69 6e 67 20 7b 20 61 63 74 69 6f 6e 20 7d 20 6d 65 61 6e   ┆       A missing { action } mean┆
0x0580…05a0 73 20 70 72 69 6e 74 20 74 68 65 20 6c 69 6e 65 3b 20 61 20 6d 69 73 73 69 6e 67 20 70 61 74 74   ┆s print the line; a missing patt┆
0x05a0…05c0 65 72 6e 0a 20 20 20 20 20 61 6c 77 61 79 73 20 6d 61 74 63 68 65 73 2e 0a 0a 20 20 20 20 20 41   ┆ern      always matches.       A┆
0x05c0…05e0 6e 20 61 63 74 69 6f 6e 20 69 73 20 61 20 73 65 71 75 65 6e 63 65 20 6f 66 20 73 74 61 74 65 6d   ┆n action is a sequence of statem┆
0x05e0…0600 65 6e 74 73 2e 20 20 41 20 73 74 61 74 65 6d 65 6e 74 20 63 61 6e 20 62 65 0a 20 20 20 20 20 6f   ┆ents.  A statement can be      o┆
0x0600…0620 6e 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 3a 0a 0a 20 20 20 20 20 20 20 20 20 20   ┆ne of the following:            ┆
0x0620…0640 69 66 20 28 20 63 6f 6e 64 69 74 69 6f 6e 61 6c 20 29 20 73 74 61 74 65 6d 65 6e 74 20 5b 20 65   ┆if ( conditional ) statement [ e┆
0x0640…0660 6c 73 65 20 73 74 61 74 65 6d 65 6e 74 20 5d 0a 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20   ┆lse statement ]           while ┆
0x0660…0680 28 20 63 6f 6e 64 69 74 69 6f 6e 61 6c 20 29 20 73 74 61 74 65 6d 65 6e 74 0a 20 20 20 20 20 20   ┆( conditional ) statement       ┆
0x0680…06a0 20 20 20 20 66 6f 72 20 28 20 65 78 70 72 65 73 73 69 6f 6e 20 3b 20 63 6f 6e 64 69 74 69 6f 6e   ┆    for ( expression ; condition┆
0x06a0…06c0 61 6c 20 3b 20 65 78 70 72 65 73 73 69 6f 6e 20 29 20 73 74 61 74 65 6d 65 6e 74 0a 20 20 20 20   ┆al ; expression ) statement     ┆
0x06c0…06e0 20 20 20 20 20 20 62 72 65 61 6b 0a 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 0a 20   ┆      break           continue  ┆
0x06e0…0700 20 20 20 20 20 20 20 20 20 7b 20 5b 20 73 74 61 74 65 6d 65 6e 74 20 5d 20 2e 2e 2e 20 7d 0a 20   ┆         { [ statement ] ... }  ┆
0x0700…0720 20 20 20 20 20 20 20 20 20 76 61 72 69 61 62 6c 65 20 3d 20 65 78 70 72 65 73 73 69 6f 6e 0a 20   ┆         variable = expression  ┆
0x0720…0740 20 20 20 20 20 20 20 20 20 70 72 69 6e 74 20 5b 20 65 78 70 72 65 73 73 69 6f 6e 2d 6c 69 73 74   ┆         print [ expression-list┆
0x0740…0760 20 5d 20 5b 20 3e 65 78 70 72 65 73 73 69 6f 6e 20 5d 0a 20 20 20 20 20 20 20 20 20 20 70 72 69   ┆ ] [ >expression ]           pri┆
0x0760…0780 6e 74 66 20 66 6f 72 6d 61 74 20 5b 20 2c 20 65 78 70 72 65 73 73 69 6f 6e 2d 6c 69 73 74 20 5d   ┆ntf format [ , expression-list ]┆
0x0780…07a0 20 5b 20 3e 65 78 70 72 65 73 73 69 6f 6e 20 5d 0a 20 20 20 20 20 20 20 20 20 20 6e 65 78 74 20   ┆ [ >expression ]           next ┆
0x07a0…07c0 23 20 73 6b 69 70 20 72 65 6d 61 69 6e 69 6e 67 20 70 61 74 74 65 72 6e 73 20 6f 6e 20 74 68 69   ┆# skip remaining patterns on thi┆
0x07c0…07e0 73 20 69 6e 70 75 74 20 6c 69 6e 65 0a 20 20 20 20 20 20 20 20 20 20 65 78 69 74 20 23 20 73 6b   ┆s input line           exit # sk┆
0x07e0…0800 69 70 20 74 68 65 20 72 65 73 74 20 6f 66 20 74 68 65 20 69 6e 70 75 74 0a 0a 20 20 20 20 20 53   ┆ip the rest of the input       S┆
0x0800…0820 74 61 74 65 6d 65 6e 74 73 20 61 72 65 20 74 65 72 6d 69 6e 61 74 65 64 20 62 79 20 73 65 6d 69   ┆tatements are terminated by semi┆
0x0820…0840 63 6f 6c 6f 6e 73 2c 20 6e 65 77 6c 69 6e 65 73 20 6f 72 20 72 69 67 68 74 0a 20 20 20 20 20 62   ┆colons, newlines or right      b┆
0x0840…0860 72 61 63 65 73 2e 20 20 41 6e 20 65 6d 70 74 79 20 65 78 70 72 65 73 73 69 6f 6e 2d 6c 69 73 74   ┆races.  An empty expression-list┆
0x0860…0880 20 73 74 61 6e 64 73 20 66 6f 72 20 74 68 65 20 77 68 6f 6c 65 20 6c 69 6e 65 2e 0a 20 20 20 20   ┆ stands for the whole line.     ┆
0x0880…08a0 20 45 78 70 72 65 73 73 69 6f 6e 73 20 74 61 6b 65 20 6f 6e 20 73 74 72 69 6e 67 20 6f 72 20 6e   ┆ Expressions take on string or n┆
0x08a0…08c0 75 6d 65 72 69 63 20 76 61 6c 75 65 73 20 61 73 20 61 70 70 72 6f 70 72 69 61 74 65 2c 0a 20 20   ┆umeric values as appropriate,   ┆
0x08c0…08e0 20 20 20 61 6e 64 20 61 72 65 20 62 75 69 6c 74 20 75 73 69 6e 67 20 74 68 65 20 6f 70 65 72 61   ┆   and are built using the opera┆
0x08e0…0900 74 6f 72 73 20 2b 2c 20 2d 2c 20 2a 2c 20 2f 2c 20 25 2c 20 20 61 6e 64 20 63 6f 6e 2d 0a 20 20   ┆tors +, -, *, /, %,  and con-   ┆
0x0900…0920 20 20 20 63 61 74 65 6e 61 74 69 6f 6e 20 28 69 6e 64 69 63 61 74 65 64 20 62 79 20 61 20 62 6c   ┆   catenation (indicated by a bl┆
0x0920…0940 61 6e 6b 29 2e 20 20 54 68 65 20 43 20 6f 70 65 72 61 74 6f 72 73 20 2b 2b 2c 20 2d 2d 2c 0a 20   ┆ank).  The C operators ++, --,  ┆
0x0940…0960 20 20 20 20 2b 3d 2c 20 2d 3d 2c 20 2a 3d 2c 20 2f 3d 2c 20 61 6e 64 20 25 3d 20 61 72 65 20 61   ┆    +=, -=, *=, /=, and %= are a┆
0x0960…0980 6c 73 6f 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 65 78 70 72 65 73 73 69 6f 6e 73 2e 0a 20 20   ┆lso available in expressions.   ┆
0x0980…09a0 20 20 20 56 61 72 69 61 62 6c 65 73 20 6d 61 79 20 62 65 20 73 63 61 6c 61 72 73 2c 20 61 72 72   ┆   Variables may be scalars, arr┆
0x09a0…09c0 61 79 20 65 6c 65 6d 65 6e 74 73 20 28 64 65 6e 6f 74 65 64 20 78 5b 69 5d 29 20 6f 72 0a 20 20   ┆ay elements (denoted x[i]) or   ┆
0x09c0…09e0 20 20 20 66 69 65 6c 64 73 2e 20 20 56 61 72 69 61 62 6c 65 73 20 61 72 65 20 69 6e 69 74 69 61   ┆   fields.  Variables are initia┆
0x09e0…0a00 6c 69 7a 65 64 20 74 6f 20 74 68 65 20 6e 75 6c 6c 20 73 74 72 69 6e 67 2e 0a 20 20 20 20 20 41   ┆lized to the null string.      A┆
0x0a00…0a20 72 72 61 79 20 73 75 62 73 63 72 69 70 74 73 20 6d 61 79 20 62 65 20 61 6e 79 20 73 74 72 69 6e   ┆rray subscripts may be any strin┆
0x0a20…0a40 67 2c 20 6e 6f 74 20 6e 65 63 65 73 73 61 72 69 6c 79 20 6e 75 6d 65 72 69 63 3b 0a 20 20 20 20   ┆g, not necessarily numeric;     ┆
0x0a40…0a60 20 74 68 69 73 20 61 6c 6c 6f 77 73 20 66 6f 72 20 61 20 66 6f 72 6d 20 6f 66 20 61 73 73 6f 63   ┆ this allows for a form of assoc┆
0x0a60…0a80 69 61 74 69 76 65 20 6d 65 6d 6f 72 79 2e 20 20 53 74 72 69 6e 67 20 63 6f 6e 2d 0a 20 20 20 20   ┆iative memory.  String con-     ┆
0x0a80…0aa0 20 73 74 61 6e 74 73 20 61 72 65 20 71 75 6f 74 65 64 20 22 2e 2e 2e 22 2e 0a 0a 0a 0a 0a 0a 0a   ┆ stants are quoted "...".       ┆
0x0aa0…0ac0 0a 20 20 20 20 20 54 68 65 20 5f 08 70 5f 08 72 5f 08 69 5f 08 6e 5f 08 74 20 73 74 61 74 65 6d   ┆      The _ p_ r_ i_ n_ t statem┆
0x0ac0…0ae0 65 6e 74 20 70 72 69 6e 74 73 20 69 74 73 20 61 72 67 75 6d 65 6e 74 73 20 6f 6e 20 74 68 65 20   ┆ent prints its arguments on the ┆
0x0ae0…0b00 73 74 61 6e 64 61 72 64 0a 20 20 20 20 20 6f 75 74 70 75 74 20 28 6f 72 20 6f 6e 20 61 20 66 69   ┆standard      output (or on a fi┆
0x0b00…0b20 6c 65 20 69 66 20 3e 5f 08 66 5f 08 69 5f 08 6c 5f 08 65 20 69 73 20 70 72 65 73 65 6e 74 29 2c   ┆le if >_ f_ i_ l_ e is present),┆
0x0b20…0b40 20 73 65 70 61 72 61 74 65 64 20 62 79 20 74 68 65 0a 20 20 20 20 20 63 75 72 72 65 6e 74 20 6f   ┆ separated by the      current o┆
0x0b40…0b60 75 74 70 75 74 20 66 69 65 6c 64 20 73 65 70 61 72 61 74 6f 72 2c 20 61 6e 64 20 74 65 72 6d 69   ┆utput field separator, and termi┆
0x0b60…0b80 6e 61 74 65 64 20 62 79 20 74 68 65 20 6f 75 74 70 75 74 0a 20 20 20 20 20 72 65 63 6f 72 64 20   ┆nated by the output      record ┆
0x0b80…0ba0 73 65 70 61 72 61 74 6f 72 2e 20 20 54 68 65 20 5f 08 70 5f 08 72 5f 08 69 5f 08 6e 5f 08 74 5f   ┆separator.  The _ p_ r_ i_ n_ t_┆
0x0ba0…0bc0 08 66 20 73 74 61 74 65 6d 65 6e 74 20 66 6f 72 6d 61 74 73 20 69 74 73 20 65 78 70 72 65 73 2d   ┆ f statement formats its expres-┆
0x0bc0…0be0 0a 20 20 20 20 20 73 69 6f 6e 20 6c 69 73 74 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 65   ┆      sion list according to the┆
0x0be0…0c00 20 66 6f 72 6d 61 74 20 28 73 65 65 20 5f 08 70 5f 08 72 5f 08 69 5f 08 6e 5f 08 74 5f 08 66 20   ┆ format (see _ p_ r_ i_ n_ t_ f ┆
0x0c00…0c20 69 6e 20 74 68 65 20 4c 69 62 72 61 72 79 0a 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 73 20 73 65   ┆in the Library      Functions se┆
0x0c20…0c40 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 54 08 54 08 54 08 54 58 08 58 08 58 08 58 20 50 08 50 08   ┆ction of the T T T TX X X X P P ┆
0x0c40…0c60 50 08 50 72 08 72 08 72 08 72 6f 08 6f 08 6f 08 6f 67 08 67 08 67 08 67 72 08 72 08 72 08 72 61   ┆P Pr r r ro o o og g g gr r r ra┆
0x0c60…0c80 08 61 08 61 08 61 6d 08 6d 08 6d 08 6d 6d 08 6d 08 6d 08 6d 65 08 65 08 65 08 65 72 08 72 08 72   ┆ a a am m m mm m m me e e er r r┆
0x0c80…0ca0 08 72 27 08 27 08 27 08 27 73 08 73 08 73 08 73 20 52 08 52 08 52 08 52 65 08 65 08 65 08 65 66   ┆ r' ' ' 's s s s R R R Re e e ef┆
0x0ca0…0cc0 08 66 08 66 08 66 65 08 65 08 65 08 65 72 08 72 08 72 08 72 65 08 65 08 65 08 65 6e 08 6e 08 6e   ┆ f f fe e e er r r re e e en n n┆
0x0cc0…0ce0 08 6e 63 08 63 08 63 08 63 65 08 65 08 65 08 65 20 4d 08 4d 08 4d 08 4d 61 08 61 08 61 08 61 6e   ┆ nc c c ce e e e M M M Ma a a an┆
0x0ce0…0d00 08 6e 08 6e 08 6e 75 08 75 08 75 08 75 61 08 61 08 61 08 61 6c 08 6c 08 6c 08 6c 29 08 29 08 29   ┆ n n nu u u ua a a al l l l) ) )┆
0x0d00…0d20 08 29 2e 08 2e 08 2e 08 2e 0a 0a 20 20 20 20 20 54 68 65 20 62 75 69 6c 74 2d 69 6e 20 66 75 6e   ┆ ). . . .       The built-in fun┆
0x0d20…0d40 63 74 69 6f 6e 20 5f 08 6c 5f 08 65 5f 08 6e 5f 08 67 5f 08 74 5f 08 68 20 72 65 74 75 72 6e 73   ┆ction _ l_ e_ n_ g_ t_ h returns┆
0x0d40…0d60 20 74 68 65 20 6c 65 6e 67 74 68 20 6f 66 20 69 74 73 20 61 72 67 75 2d 0a 20 20 20 20 20 6d 65   ┆ the length of its argu-      me┆
0x0d60…0d80 6e 74 20 74 61 6b 65 6e 20 61 73 20 61 20 73 74 72 69 6e 67 2c 20 6f 72 20 6f 66 20 74 68 65 20   ┆nt taken as a string, or of the ┆
0x0d80…0da0 77 68 6f 6c 65 20 6c 69 6e 65 20 69 66 20 6e 6f 20 61 72 67 75 6d 65 6e 74 2e 0a 20 20 20 20 20   ┆whole line if no argument.      ┆
0x0da0…0dc0 54 68 65 72 65 20 61 72 65 20 61 6c 73 6f 20 62 75 69 6c 74 2d 69 6e 20 66 75 6e 63 74 69 6f 6e   ┆There are also built-in function┆
0x0dc0…0de0 73 20 5f 08 65 5f 08 78 5f 08 70 2c 20 5f 08 6c 5f 08 6f 5f 08 67 2c 20 5f 08 73 5f 08 71 5f 08   ┆s _ e_ x_ p, _ l_ o_ g, _ s_ q_ ┆
0x0de0…0e00 72 5f 08 74 2c 20 61 6e 64 20 5f 08 69 5f 08 6e 5f 08 74 2e 0a 20 20 20 20 20 54 68 65 20 6c 61   ┆r_ t, and _ i_ n_ t.      The la┆
0x0e00…0e20 73 74 20 74 72 75 6e 63 61 74 65 73 20 69 74 73 20 61 72 67 75 6d 65 6e 74 20 74 6f 20 61 6e 20   ┆st truncates its argument to an ┆
0x0e20…0e40 69 6e 74 65 67 65 72 2e 0a 20 20 20 20 20 5f 08 73 5f 08 75 5f 08 62 5f 08 73 5f 08 74 5f 08 72   ┆integer.      _ s_ u_ b_ s_ t_ r┆
0x0e40…0e60 28 5f 08 73 2c 20 5f 08 6d 2c 20 5f 08 6e 29 20 72 65 74 75 72 6e 73 20 74 68 65 20 5f 08 6e 2d   ┆(_ s, _ m, _ n) returns the _ n-┆
0x0e60…0e80 63 68 61 72 61 63 74 65 72 20 73 75 62 73 74 72 69 6e 67 20 6f 66 20 5f 08 73 20 74 68 61 74 0a   ┆character substring of _ s that ┆
0x0e80…0ea0 20 20 20 20 20 62 65 67 69 6e 73 20 61 74 20 70 6f 73 69 74 69 6f 6e 20 5f 08 6d 2e 20 20 54 68   ┆     begins at position _ m.  Th┆
0x0ea0…0ec0 65 20 66 75 6e 63 74 69 6f 6e 0a 20 20 20 20 20 5f 08 73 5f 08 70 5f 08 72 5f 08 69 5f 08 6e 5f   ┆e function      _ s_ p_ r_ i_ n_┆
0x0ec0…0ee0 08 74 5f 08 66 28 5f 08 66 5f 08 6d 5f 08 74 2c 20 5f 08 65 5f 08 78 5f 08 70 5f 08 72 2c 20 5f   ┆ t_ f(_ f_ m_ t, _ e_ x_ p_ r, _┆
0x0ee0…0f00 08 65 5f 08 78 5f 08 70 5f 08 72 2c 20 2e 2e 2e 29 20 66 6f 72 6d 61 74 73 20 74 68 65 20 65 78   ┆ e_ x_ p_ r, ...) formats the ex┆
0x0f00…0f20 70 72 65 73 73 69 6f 6e 73 0a 20 20 20 20 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 65 20   ┆pressions      according to the ┆
0x0f20…0f40 5f 08 70 5f 08 72 5f 08 69 5f 08 6e 5f 08 74 5f 08 66 20 66 6f 72 6d 61 74 20 67 69 76 65 6e 20   ┆_ p_ r_ i_ n_ t_ f format given ┆
0x0f40…0f60 62 79 20 5f 08 66 5f 08 6d 5f 08 74 20 61 6e 64 20 72 65 74 75 72 6e 73 20 74 68 65 0a 20 20 20   ┆by _ f_ m_ t and returns the    ┆
0x0f60…0f80 20 20 72 65 73 75 6c 74 69 6e 67 20 73 74 72 69 6e 67 2e 0a 0a 20 20 20 20 20 50 61 74 74 65 72   ┆  resulting string.       Patter┆
0x0f80…0fa0 6e 73 20 61 72 65 20 61 72 62 69 74 72 61 72 79 20 42 6f 6f 6c 65 61 6e 20 63 6f 6d 62 69 6e 61   ┆ns are arbitrary Boolean combina┆
0x0fa0…0fc0 74 69 6f 6e 73 20 28 21 2c 20 7c 7c 2c 20 26 26 2c 20 61 6e 64 0a 20 20 20 20 20 70 61 72 65 6e   ┆tions (!, ||, &&, and      paren┆
0x0fc0…0fe0 74 68 65 73 65 73 29 20 6f 66 20 72 65 67 75 6c 61 72 20 65 78 70 72 65 73 73 69 6f 6e 73 20 61   ┆theses) of regular expressions a┆
0x0fe0…1000 6e 64 20 72 65 6c 61 74 69 6f 6e 61 6c 20 65 78 70 72 65 73 2d 0a 20 20 20 20 20 73 69 6f 6e 73   ┆nd relational expres-      sions┆
0x1000…1020 2e 20 20 52 65 67 75 6c 61 72 20 65 78 70 72 65 73 73 69 6f 6e 73 20 6d 75 73 74 20 62 65 20 73   ┆.  Regular expressions must be s┆
0x1020…1040 75 72 72 6f 75 6e 64 65 64 20 62 79 20 73 6c 61 73 68 65 73 0a 20 20 20 20 20 61 6e 64 20 61 72   ┆urrounded by slashes      and ar┆
0x1040…1060 65 20 61 73 20 69 6e 20 5f 08 65 5f 08 67 5f 08 72 5f 08 65 5f 08 70 2e 20 20 49 73 6f 6c 61 74   ┆e as in _ e_ g_ r_ e_ p.  Isolat┆
0x1060…1080 65 64 20 72 65 67 75 6c 61 72 20 65 78 70 72 65 73 73 69 6f 6e 73 20 69 6e 20 61 20 70 61 74 2d   ┆ed regular expressions in a pat-┆
0x1080…10a0 0a 20 20 20 20 20 74 65 72 6e 20 61 70 70 6c 79 20 74 6f 20 74 68 65 20 65 6e 74 69 72 65 20 6c   ┆      tern apply to the entire l┆
0x10a0…10c0 69 6e 65 2e 20 20 52 65 67 75 6c 61 72 20 65 78 70 72 65 73 73 69 6f 6e 73 20 6d 61 79 20 61 6c   ┆ine.  Regular expressions may al┆
0x10c0…10e0 73 6f 0a 20 20 20 20 20 6f 63 63 75 72 20 69 6e 20 72 65 6c 61 74 69 6f 6e 61 6c 20 65 78 70 72   ┆so      occur in relational expr┆
0x10e0…1100 65 73 73 69 6f 6e 73 2e 0a 0a 20 20 20 20 20 41 20 70 61 74 74 65 72 6e 20 6d 61 79 20 63 6f 6e   ┆essions.       A pattern may con┆
0x1100…1120 73 69 73 74 20 6f 66 20 74 77 6f 20 70 61 74 74 65 72 6e 73 20 73 65 70 61 72 61 74 65 64 20 62   ┆sist of two patterns separated b┆
0x1120…1140 79 20 61 20 63 6f 6d 6d 61 3b 0a 20 20 20 20 20 69 6e 20 74 68 69 73 20 63 61 73 65 2c 20 74 68   ┆y a comma;      in this case, th┆
0x1140…1160 65 20 61 63 74 69 6f 6e 20 69 73 20 70 65 72 66 6f 72 6d 65 64 20 66 6f 72 20 61 6c 6c 20 6c 69   ┆e action is performed for all li┆
0x1160…1180 6e 65 73 20 62 65 74 77 65 65 6e 0a 20 20 20 20 20 61 6e 20 6f 63 63 75 72 72 65 6e 63 65 20 6f   ┆nes between      an occurrence o┆
0x1180…11a0 66 20 74 68 65 20 66 69 72 73 74 20 70 61 74 74 65 72 6e 20 61 6e 64 20 74 68 65 20 6e 65 78 74   ┆f the first pattern and the next┆
0x11a0…11c0 20 6f 63 63 75 72 72 65 6e 63 65 0a 20 20 20 20 20 6f 66 20 74 68 65 20 73 65 63 6f 6e 64 2e 0a   ┆ occurrence      of the second. ┆
0x11c0…11e0 0a 20 20 20 20 20 41 20 72 65 6c 61 74 69 6f 6e 61 6c 20 65 78 70 72 65 73 73 69 6f 6e 20 69 73   ┆      A relational expression is┆
0x11e0…1200 20 6f 6e 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 3a 0a 0a 20 20 20 20 20 20 20 20   ┆ one of the following:          ┆
0x1200…1220 20 20 65 78 70 72 65 73 73 69 6f 6e 20 6d 61 74 63 68 6f 70 20 72 65 67 75 6c 61 72 2d 65 78 70   ┆  expression matchop regular-exp┆
0x1220…1240 72 65 73 73 69 6f 6e 0a 20 20 20 20 20 20 20 20 20 20 65 78 70 72 65 73 73 69 6f 6e 20 72 65 6c   ┆ression           expression rel┆
0x1240…1260 6f 70 20 65 78 70 72 65 73 73 69 6f 6e 0a 0a 20 20 20 20 20 77 68 65 72 65 20 61 20 72 65 6c 6f   ┆op expression       where a relo┆
0x1260…1280 70 20 69 73 20 61 6e 79 20 6f 66 20 74 68 65 20 73 69 78 20 72 65 6c 61 74 69 6f 6e 61 6c 20 6f   ┆p is any of the six relational o┆
0x1280…12a0 70 65 72 61 74 6f 72 73 20 69 6e 20 43 2c 0a 20 20 20 20 20 61 6e 64 20 61 20 6d 61 74 63 68 6f   ┆perators in C,      and a matcho┆
0x12a0…12c0 70 20 69 73 20 65 69 74 68 65 72 20 7e 20 28 74 69 6c 64 65 2c 20 6d 65 61 6e 69 6e 67 20 60 60   ┆p is either ~ (tilde, meaning ``┆
0x12c0…12e0 63 6f 6e 74 61 69 6e 73 27 27 29 20 6f 72 0a 20 20 20 20 20 21 7e 20 28 6d 65 61 6e 69 6e 67 20   ┆contains'') or      !~ (meaning ┆
0x12e0…1300 60 60 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 6e 27 27 29 2e 20 20 41 20 63 6f 6e 64 69 74   ┆``does not contain'').  A condit┆
0x1300…1320 69 6f 6e 61 6c 20 69 73 20 61 6e 0a 20 20 20 20 20 61 72 69 74 68 6d 65 74 69 63 20 65 78 70 72   ┆ional is an      arithmetic expr┆
0x1320…1340 65 73 73 69 6f 6e 2c 20 61 20 72 65 6c 61 74 69 6f 6e 61 6c 20 65 78 70 72 65 73 73 69 6f 6e 2c   ┆ession, a relational expression,┆
0x1340…1360 20 6f 72 20 61 20 42 6f 6f 6c 65 61 6e 0a 20 20 20 20 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 20 6f   ┆ or a Boolean      combination o┆
0x1360…1380 66 20 74 68 65 73 65 2e 0a 0a 20 20 20 20 20 54 68 65 20 73 70 65 63 69 61 6c 20 70 61 74 74 65   ┆f these.       The special patte┆
0x1380…13a0 72 6e 73 20 42 45 47 49 4e 20 61 6e 64 20 45 4e 44 20 6d 61 79 20 62 65 20 75 73 65 64 20 74 6f   ┆rns BEGIN and END may be used to┆
0x13a0…13c0 20 63 61 70 74 75 72 65 0a 20 20 20 20 20 63 6f 6e 74 72 6f 6c 20 62 65 66 6f 72 65 20 74 68 65   ┆ capture      control before the┆
0x13c0…13e0 20 66 69 72 73 74 20 69 6e 70 75 74 20 6c 69 6e 65 20 69 73 20 72 65 61 64 20 61 6e 64 20 61 66   ┆ first input line is read and af┆
0x13e0…1400 74 65 72 20 74 68 65 0a 20 20 20 20 20 6c 61 73 74 2e 20 20 42 45 47 49 4e 20 6d 75 73 74 20 62   ┆ter the      last.  BEGIN must b┆
0x1400…1420 65 20 74 68 65 20 66 69 72 73 74 20 70 61 74 74 65 72 6e 2c 20 45 4e 44 20 74 68 65 20 6c 61 73   ┆e the first pattern, END the las┆
0x1420…1440 74 2e 0a 0a 20 20 20 20 20 41 20 73 69 6e 67 6c 65 20 63 68 61 72 61 63 74 65 72 20 5f 08 63 20   ┆t.       A single character _ c ┆
0x1440…1460 6d 61 79 20 62 65 20 75 73 65 64 20 74 6f 20 73 65 70 61 72 61 74 65 20 74 68 65 20 66 69 65 6c   ┆may be used to separate the fiel┆
0x1460…1480 64 73 20 62 79 0a 20 20 20 20 20 73 74 61 72 74 69 6e 67 20 74 68 65 20 70 72 6f 67 72 61 6d 20   ┆ds by      starting the program ┆
0x1480…14a0 77 69 74 68 0a 0a 20 20 20 20 20 20 20 20 20 20 42 45 47 49 4e 20 7b 20 46 53 20 3d 20 60 63 27   ┆with            BEGIN { FS = `c'┆
0x14a0…14c0 20 7d 0a 0a 20 20 20 20 20 6f 72 20 62 79 20 75 73 69 6e 67 20 74 68 65 20 2d 08 2d 08 2d 08 2d   ┆ }       or by using the - - - -┆
0x14c0…14e0 46 08 46 08 46 08 46 5f 08 63 20 6f 70 74 69 6f 6e 2e 0a 0a 20 20 20 20 20 4f 74 68 65 72 20 76   ┆F F F F_ c option.       Other v┆
0x14e0…1500 61 72 69 61 62 6c 65 20 6e 61 6d 65 73 20 77 69 74 68 20 73 70 65 63 69 61 6c 20 6d 65 61 6e 69   ┆ariable names with special meani┆
0x1500…1520 6e 67 73 20 69 6e 63 6c 75 64 65 20 4e 46 2c 20 74 68 65 0a 20 20 20 20 20 6e 75 6d 62 65 72 20   ┆ngs include NF, the      number ┆
0x1520…1540 6f 66 20 66 69 65 6c 64 73 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 72 65 63 6f 72 64 3b   ┆of fields in the current record;┆
0x1540…1560 20 4e 52 2c 20 74 68 65 20 6f 72 64 69 6e 61 6c 0a 20 20 20 20 20 6e 75 6d 62 65 72 20 6f 66 20   ┆ NR, the ordinal      number of ┆
0x1560…1580 74 68 65 20 63 75 72 72 65 6e 74 20 72 65 63 6f 72 64 3b 20 46 49 4c 45 4e 41 4d 45 2c 20 74 68   ┆the current record; FILENAME, th┆
0x1580…15a0 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 0a 20 20 20 20 20 63 75 72 72 65 6e 74 20 69 6e 70 75 74   ┆e name of the      current input┆
0x15a0…15c0 20 66 69 6c 65 3b 20 4f 46 53 2c 20 74 68 65 20 6f 75 74 70 75 74 20 66 69 65 6c 64 20 73 65 70   ┆ file; OFS, the output field sep┆
0x15c0…15e0 61 72 61 74 6f 72 20 28 64 65 66 61 75 6c 74 0a 20 20 20 20 20 62 6c 61 6e 6b 29 3b 20 4f 52 53   ┆arator (default      blank); ORS┆
0x15e0…1600 2c 20 74 68 65 20 6f 75 74 70 75 74 20 72 65 63 6f 72 64 20 73 65 70 61 72 61 74 6f 72 20 28 64   ┆, the output record separator (d┆
0x1600…1620 65 66 61 75 6c 74 20 6e 65 77 6c 69 6e 65 29 3b 0a 20 20 20 20 20 61 6e 64 20 4f 46 4d 54 2c 20   ┆efault newline);      and OFMT, ┆
0x1620…1640 74 68 65 20 6f 75 74 70 75 74 20 66 6f 72 6d 61 74 20 66 6f 72 20 6e 75 6d 62 65 72 73 20 28 64   ┆the output format for numbers (d┆
0x1640…1660 65 66 61 75 6c 74 20 60 60 25 2e 36 67 27 27 29 2e 0a 0a 45 08 45 08 45 08 45 58 08 58 08 58 08   ┆efault ``%.6g'').  E E E EX X X ┆
0x1660…1680 58 41 08 41 08 41 08 41 4d 08 4d 08 4d 08 4d 50 08 50 08 50 08 50 4c 08 4c 08 4c 08 4c 45 08 45   ┆XA A A AM M M MP P P PL L L LE E┆
0x1680…16a0 08 45 08 45 53 08 53 08 53 08 53 0a 0a 0a 0a 0a 0a 0a 0a 20 20 20 20 20 50 72 69 6e 74 20 6c 69   ┆ E ES S S S             Print li┆
0x16a0…16c0 6e 65 73 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 37 32 20 63 68 61 72 61 63 74 65 72 73 3a 0a 0a   ┆nes longer than 72 characters:  ┆
0x16c0…16e0 20 20 20 20 20 20 20 20 20 20 6c 65 6e 67 74 68 20 3e 20 37 32 0a 0a 20 20 20 20 20 50 72 69 6e   ┆          length > 72       Prin┆
0x16e0…1700 74 20 66 69 72 73 74 20 74 77 6f 20 66 69 65 6c 64 73 20 69 6e 20 6f 70 70 6f 73 69 74 65 20 6f   ┆t first two fields in opposite o┆
0x1700…1720 72 64 65 72 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 7b 20 70 72 69 6e 74 20 24 32 2c 20 24 31 20   ┆rder:            { print $2, $1 ┆
0x1720…1740 7d 0a 0a 20 20 20 20 20 41 64 64 20 75 70 20 66 69 72 73 74 20 63 6f 6c 75 6d 6e 2c 20 70 72 69   ┆}       Add up first column, pri┆
0x1740…1760 6e 74 20 73 75 6d 20 61 6e 64 20 61 76 65 72 61 67 65 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 20   ┆nt sum and average:             ┆
0x1760…1780 20 20 20 20 7b 20 73 20 2b 3d 20 24 31 20 7d 0a 20 20 20 20 20 20 20 20 20 20 45 4e 44 20 20 7b   ┆    { s += $1 }           END  {┆
0x1780…17a0 20 70 72 69 6e 74 20 22 73 75 6d 20 69 73 22 2c 20 73 2c 20 22 20 61 76 65 72 61 67 65 20 69 73   ┆ print "sum is", s, " average is┆
0x17a0…17c0 22 2c 20 73 2f 4e 52 20 7d 0a 0a 20 20 20 20 20 50 72 69 6e 74 20 66 69 65 6c 64 73 20 69 6e 20   ┆", s/NR }       Print fields in ┆
0x17c0…17e0 72 65 76 65 72 73 65 20 6f 72 64 65 72 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 7b 20 66 6f 72 20   ┆reverse order:            { for ┆
0x17e0…1800 28 69 20 3d 20 4e 46 3b 20 69 20 3e 20 30 3b 20 2d 2d 69 29 20 70 72 69 6e 74 20 24 69 20 7d 0a   ┆(i = NF; i > 0; --i) print $i } ┆
0x1800…1820 0a 20 20 20 20 20 50 72 69 6e 74 20 61 6c 6c 20 6c 69 6e 65 73 20 62 65 74 77 65 65 6e 20 73 74   ┆      Print all lines between st┆
0x1820…1840 61 72 74 2f 73 74 6f 70 20 70 61 69 72 73 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 2f 73 74 61 72   ┆art/stop pairs:            /star┆
0x1840…1860 74 2f 2c 20 2f 73 74 6f 70 2f 0a 0a 20 20 20 20 20 50 72 69 6e 74 20 61 6c 6c 20 6c 69 6e 65 73   ┆t/, /stop/       Print all lines┆
0x1860…1880 20 77 68 6f 73 65 20 66 69 72 73 74 20 66 69 65 6c 64 20 69 73 20 64 69 66 66 65 72 65 6e 74 20   ┆ whose first field is different ┆
0x1880…18a0 66 72 6f 6d 20 70 72 65 76 69 6f 75 73 0a 20 20 20 20 20 6f 6e 65 3a 0a 0a 20 20 20 20 20 20 20   ┆from previous      one:         ┆
0x18a0…18c0 20 20 20 24 31 20 21 3d 20 70 72 65 76 20 7b 20 70 72 69 6e 74 3b 20 70 72 65 76 20 3d 20 24 31   ┆   $1 != prev { print; prev = $1┆
0x18c0…18e0 20 7d 0a 0a 53 08 53 08 53 08 53 45 08 45 08 45 08 45 45 08 45 08 45 08 45 20 41 08 41 08 41 08   ┆ }  S S S SE E E EE E E E A A A ┆
0x18e0…1900 41 4c 08 4c 08 4c 08 4c 53 08 53 08 53 08 53 4f 08 4f 08 4f 08 4f 0a 20 20 20 20 20 55 73 65 72   ┆AL L L LS S S SO O O O      User┆
0x1900…1920 20 43 6f 6d 6d 61 6e 64 73 20 28 31 29 3a 20 20 6c 65 78 2c 20 73 65 64 0a 20 20 20 20 20 4c 69   ┆ Commands (1):  lex, sed      Li┆
[…truncated at 200 lines…]