delamc.icn: Program to delaminate file using tab characters

May 28, 1989; Thomas R. Hicks
This file is in the public domain.
   This program delaminates standard input into several output
files according to the separator characters specified by the
string following the -t option.  It writes the fields in each
line to the corresponding output files as individual lines. If no
data occurs in the specified position for a given input line an
empty output line is written. This insures that all output files
contain the same number of lines as the input file.

   If - is used as an output file name, the corresponding field
is written to the standard output. If the -t option is not used,
an ascii horizontal tab character is assumed as the default field
separator.

   The use of delamc is illustrated by the following examples.
The command

        delamc labels opcodes operands

writes the fields of standard input, each of which is separated
by a tab character, to the output files labels, opcodes, and
operands.  The command

        delamc -t: scores names matric ps1 ps2 ps3

writes the fields of standard input, each of which are separated
by a colon, to the indicated output files.  The command

        delamc -t,: oldata f1 f2

separates the fields using either a comma or a colon.

Source code | Program Library Page | Icon Home Page