chronic, combine, ifdata, ifne, isutf8: add pages (#12114)

* chronic, combine, ifdata, ifne, isutf8: add pages

---------

Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
pull/23/head
Juri Dispan 2024-01-24 08:29:50 +01:00 committed by GitHub
parent 4ed602d9fa
commit a5bc5828f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 98 additions and 0 deletions

16
pages/common/chronic.md Normal file
View File

@ -0,0 +1,16 @@
# chronic
> Display `stdout` and `stderr` of a command if and only if it fails.
> More information: <https://joeyh.name/code/moreutils/>.
- Display `stdout` and `stderr` of the specified command if and only if it produces a non-zero exit code or crashes:
`chronic {{command options ...}}`
- Display `stdout` and `stderr` of the specified command if and only if it produces a non-empty `stderr`:
`chronic -e {{command options ...}}`
- Enable [v]erbose mode:
`chronic -v {{command options ...}}`

22
pages/common/combine.md Normal file
View File

@ -0,0 +1,22 @@
# combine
> Perform set operations on lines of two files.
> The order of the output lines is determined by the order of the lines in the first file.
> See also: `diff`.
> More information: <https://joeyh.name/code/moreutils/>.
- Output lines that are in both specified files:
`combine {{path/to/file1}} and {{path/to/file2}}`
- Output lines that are in the first but not in the second file:
`combine {{path/to/file1}} not {{path/to/file2}}`
- Output lines that in are in either of the specified files:
`combine {{path/to/file1}} or {{path/to/file2}}`
- Output lines that are in exactly one of the specified files:
`combine {{path/to/file1}} xor {{path/to/file2}}`

24
pages/common/ifdata.md Normal file
View File

@ -0,0 +1,24 @@
# ifdata
> Display information about a network interface.
> More information: <https://joeyh.name/code/moreutils/>.
- Display the whole configuration of the specified interface:
`ifdata -p {{eth0}}`
- Indicate the [e]xistence of the specified interface via the exit code:
`ifdata -e {{eth0}}`
- Display the IPv4 [a]dress and the [n]etmask of the specified interface:
`ifdata -pa -pn {{eth0}}`
- Display the [N]etwork adress, the [b]roadcast adress, and the MTU of the specified interface:
`ifdata -pN -pb -pm {{eth0}}`
- Display help:
`ifdata`

12
pages/common/ifne.md Normal file
View File

@ -0,0 +1,12 @@
# ifne
> Run a command depending on the emptyness of `stdin`.
> More information: <https://joeyh.name/code/moreutils/>.
- Run the specified command if and only if `stdin` is not empty:
`ifne {{command options ...}}`
- Run the specified command if and only if `stdin` is empty, otherwise pass `stdin` to `stdout`:
`ifne -n {{command options ...}}`

24
pages/common/isutf8.md Normal file
View File

@ -0,0 +1,24 @@
# isutf8
> Check whether text files contain valid UTF-8.
> More information: <https://joeyh.name/code/moreutils/>.
- Check whether the specified files contain valid UTF-8:
`isutf8 {{path/to/file1 path/to/file2 ...}}`
- Print errors using multiple lines:
`isutf8 --verbose {{path/to/file1 path/to/file2 ...}}`
- Do not print anything to `stdout`, indicate the result merely with the exit code:
`isutf8 --quiet {{path/to/file1 path/to/file2 ...}}`
- Only print the names of the files containing invalid UTF-8:
`isutf8 --list {{path/to/file1 path/to/file2 ...}}`
- Same as `--list` but inverted, i.e., only print the names of the files containing valid UTF-8:
`isutf8 --invert {{path/to/file1 path/to/file2 ...}}`