2024-03-29 16:47:00 -06:00
|
|
|
.\" 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/>.
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
.TH fop 1
|
|
|
|
.SH NAME
|
|
|
|
fop \(en field operator
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
.SH SYNOPSIS
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
fop
|
|
|
|
.RB ( -d )
|
|
|
|
.RB [ delimiter ]
|
|
|
|
.RB index
|
|
|
|
.RB program...
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
.SH DESCRIPTION
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
Performs operations on specified fields in input data.
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
.SH OPTIONS
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
|
|
|
.IP \fB-d\fP
|
2024-03-29 16:47:00 -06:00
|
|
|
Sets a delimiter by which the input data will be split into fields. The default
|
|
|
|
is an ASCII record separator (␞).
|
|
|
|
.SH STANDARD INPUT
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
Data will be read from the standard input.
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
.SH CAVEATS
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
Field indices are zero-indexed, which may be unexpected behavior for some users.
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
.SH RATIONALE
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
With the assumption that tools will output data separated with ASCII field
|
2024-06-02 18:47:14 -06:00
|
|
|
separators, there is a need for the ability to modify select fields in this data
|
|
|
|
easily and quickly.
|
2024-03-29 16:47:00 -06:00
|
|
|
|
2024-06-02 18:47:14 -06:00
|
|
|
The idea for this utility originated in the fact that the GNU
|
|
|
|
.BR ls (1)
|
|
|
|
utility contains a
|
2024-03-29 16:47:00 -06:00
|
|
|
.B -h
|
|
|
|
option which enables human-readable units in file size outputs. This
|
2024-06-02 18:47:14 -06:00
|
|
|
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.
|
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
.SH COPYRIGHT
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
|
|
|
Copyright \(co 2024 Emma Tebibyte. License AGPLv3+: GNU AGPL version 3 or later
|
2024-03-29 16:47:00 -06:00
|
|
|
<https://gnu.org/licenses/agpl.html>.
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
2024-03-29 16:47:00 -06:00
|
|
|
.SH SEE ALSO
|
2024-06-02 18:47:14 -06:00
|
|
|
.\"
|
|
|
|
.BR sed (1p)
|