getcols - extract byte-wise columns
SYNOPSIS
getcols start- | -end | start-end [ file ... ]
DESCRIPTION
getcols
extracts the bytes specified by
start
and
end
from
file
(default standard input)
and prints them on the standard output.
The placement of the standard input in a list of files
is indicated by `-'.
Columns are defined as byte-wise offsets in a row or line
and specification of columns
can take one of the following three forms:
- start-
- print from the start column to the end of the line.
- -end
- print from the beginning of the line up to and
including the end column.
- start-end
- print from the start column up to and
including the end column.
EXAMPLES
$ cat junk
123456789
$ getcols 3-7 < junk
34567
$ getcols -4 < junk
1234
$ getcols 6-6 < junk
6
SEE ALSO