(Video materials in preparation)
lineup : Returns the data in the specified field in ascending order
Usage : lineup [-f] <f1> <f2> ... <file>
Version : Tue Jan 9 09:02:34 JST 2024
Edition : 1
Reads the data in the specified field of <file> and outputs it
as a "lineup" in ascending order.
If <file> is omitted or specified as "-" the command reads from standard input.
$ cat data
1 1 717300 abc1
1 2 717301 abc2
1 3 717302 abc3
1 1 717303 abc4
1 2 717304 abc5
2 0 717305 abc6
2 2 717306 abc7
2 2 717307 abc8
3 4 717308 abc9
3 4 717309 abcA
3 4 717310 abcB
$ lineup 2 data
0
1
2
3
4
If multiple fields are specified, the specified fields are sorted and output
together as a lineup.
$ lineup 1 2 data
1 1
1 2
1 3
2 0
2 2
3 4
Fields must be specified in ascending order.
$ lineup 1 2 data OK
$ lineup 2 1 data Error
Specify continuous fields.
$ lineup 1/2 data
1 1
1 2
1 3
2 0
2 2
3 4
Do not use files whose filename is entirely numeric.
If there exists a file whose filename is "10", then when you
run lineup 1 10 --> it will line up the first field from the
file named "10" instead of lining up fields 1 through 10 from
standard input.
However, if you specify fields with only one digit (i.e. "2"), then
even if there is a file named "2" it will be ignored and "2" will
be considered the field designator.