(Video materials in preparation)
tagselr : Selects rows that match exactly
Usage : tagselr <field> <str> <file>
Option : --through <str>
Version : Tue Jan 9 09:02:34 JST 2024
Edition : 1
Outputs records from <file> where the specified field <field>
matches the specified string <str> exactly.
If <file> is omitted or equal to "-", data is read from stdin.
Only outputs rows where the specified field matches exactly.
$ cat data
NUM LTR
0001 a
0002 b
0003 c
0004 c
$ tagselr NUM 0001 data
NUM LTR
0001 a
$ tagselr LTR c data
NUM LTR
0003 c
0004 c
If you specify option --through <str> then if both <str> values are
the same all records are output unconditionally, while if the two
<str> values are different, the command executes normally as if
--through were not specified.
$ tagselr --through _ LTR _ data
NUM LTR
0001 a
0002 b
0003 c
0004 c
$ tagselr --through _ LTR a data
NUM LTR
0003 c
0004 c