60 lines
1.4 KiB
Groff
60 lines
1.4 KiB
Groff
.\" Copyright (c) 2024 DTB <trinity@trinity.moe>
|
|
.\" Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
|
|
.\"
|
|
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
|
|
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
|
.\"
|
|
.TH fop 1
|
|
.SH NAME
|
|
fop \(en field operator
|
|
.\"
|
|
.SH SYNOPSIS
|
|
|
|
fop
|
|
.RB ( -d )
|
|
.RB [ delimiter ]
|
|
.RB index
|
|
.RB program...
|
|
.\"
|
|
.SH DESCRIPTION
|
|
|
|
Performs operations on specified fields in input data.
|
|
.\"
|
|
.SH OPTIONS
|
|
|
|
.IP \fB-d\fP
|
|
Sets a delimiter by which the input data will be split into fields. The default
|
|
is an ASCII record separator (␞).
|
|
.SH STANDARD INPUT
|
|
|
|
Data will be read from the standard input.
|
|
.\"
|
|
.SH CAVEATS
|
|
|
|
Field indices are zero-indexed, which may be unexpected behavior for some users.
|
|
.\"
|
|
.SH RATIONALE
|
|
|
|
With the assumption that tools will output data separated with ASCII field
|
|
separators, there is a need for the ability to modify select fields in this data
|
|
easily and quickly.
|
|
|
|
The idea for this utility originated in the fact that the GNU
|
|
.BR ls (1)
|
|
utility contains a
|
|
.B -h
|
|
option which enables human-readable units in file size outputs. This
|
|
functionality was broken out into
|
|
.BR hru (1),
|
|
but there was no easy way to modify the field in the ouput of
|
|
.BR ls (1p)
|
|
without creating a new tool.
|
|
.\"
|
|
.SH COPYRIGHT
|
|
|
|
Copyright \(co 2024 Emma Tebibyte. License AGPLv3+: GNU AGPL version 3 or later
|
|
<https://gnu.org/licenses/agpl.html>.
|
|
.\"
|
|
.SH SEE ALSO
|
|
.BR sed (1p)
|