|
|
1.1 ! root 1: ! 2: ! 3: ! 4: DELAM(1) Icon Program Library DELAM(1) ! 5: ! 6: ! 7: ! 8: NNNNAAAAMMMMEEEE ! 9: delam - delaminate a file using column positions ! 10: ! 11: SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ! 12: ddddeeeellllaaaammmm fieldlist {infile | -} {outputfile | -}... ! 13: ! 14: DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN ! 15: _D_e_l_a_m delaminates an input file into several output files ! 16: according to the fields specified by ffffiiiieeeellllddddlllliiiisssstttt. _D_e_l_a_m reads ! 17: iiiinnnnffffiiiilllleeee and writes the fields in each line to the correspond- ! 18: ing output files as individual lines. If no data occurs in ! 19: the specified position for a given input line an empty out- ! 20: put line is written. This insures that all output files con- ! 21: tain the same number of lines as the input file. ! 22: ! 23: If `-' is used for iiiinnnnffffiiiilllleeee, the standard input is read. If ! 24: `-' is used as an output file name, the corresponding field ! 25: is written to the standard output. ! 26: ! 27: The fields are defined by ffffiiiieeeellllddddlllliiiisssstttt, which is a list of ! 28: field specifications, separated by commas, colons, or semi- ! 29: colons, of the following form: ! 30: ! 31: _n the character in column _n ! 32: _n-_m the characters in columns _n through _m ! 33: _n+_m _m characters beginning at column _n ! 34: ! 35: where the columns in a line are numbered from 1 to the ! 36: length of the line. ! 37: ! 38: The use of _d_e_l_a_m is illustrated by the following examples. ! 39: ! 40: delam 1-10,5 foo x y ! 41: ! 42: reads file _f_o_o and writes characters 1 through 10 to file _x ! 43: and character 5 to file _y. ! 44: ! 45: delam 10+5:1-10:1-10:80 - middle left1 left2 end ! 46: ! 47: reads the standard input and writes characters 10 through 14 ! 48: to _m_i_d_d_l_e, 1 through 10 to _l_e_f_t_1 and _l_e_f_t_2, and character 80 ! 49: to _e_n_d. ! 50: ! 51: delam 1-80;1-80 - - - ! 52: ! 53: copies the standard input to the standard output, replicat- ! 54: ing the first eighty columns of each line twice. ! 55: ! 56: NNNNOOOOTTTTEEEESSSS ! 57: The functionality of the Software Tools _d_e_l_a_m has been ! 58: divided. The Icon version of _d_e_l_a_m uses an extended ! 59: fieldlist syntax. ! 60: ! 61: ! 62: ! 63: Version 5.9 The University of Arizona - 8/15/84 1 ! 64: ! 65: ! 66: ! 67: ! 68: ! 69: ! 70: DELAM(1) Icon Program Library DELAM(1) ! 71: ! 72: ! 73: ! 74: SSSSEEEEEEEE AAAALLLLSSSSOOOO ! 75: lam(1), delamc(1) ! 76: ! 77: Hanson, David R. _S_o_f_t_w_a_r_e _T_o_o_l_s _U_s_e_r'_s _M_a_n_u_a_l, Technical ! 78: Report TR 81-20, Department of Computer Science, The Univer- ! 79: sity of Arizona. 1981. ! 80: ! 81: ! 82: ! 83: ! 84: ! 85: ! 86: ! 87: ! 88: ! 89: ! 90: ! 91: ! 92: ! 93: ! 94: ! 95: ! 96: ! 97: ! 98: ! 99: ! 100: ! 101: ! 102: ! 103: ! 104: ! 105: ! 106: ! 107: ! 108: ! 109: ! 110: ! 111: ! 112: ! 113: ! 114: ! 115: ! 116: ! 117: ! 118: ! 119: ! 120: ! 121: ! 122: ! 123: ! 124: ! 125: ! 126: ! 127: ! 128: ! 129: Version 5.9 The University of Arizona - 8/15/84 2 ! 130: ! 131: ! 132:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.