1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

wc: Add -L option to show the length of the longest line

If more than one file is specified on the command line and the `-L`
option is used, the totals field will show the longest line
encountered; it is not a sum like the other values.
This commit is contained in:
Tim Ledbetter 2023-06-22 22:30:27 +01:00 committed by Andreas Kling
parent 8e52d1125d
commit 702054dcbc
2 changed files with 19 additions and 3 deletions

View file

@ -5,7 +5,7 @@ wc - word, line, character, and byte count
## Synopsis
```sh
$ wc [--lines] [--bytes] [--words] [file...]
$ wc [--lines] [--bytes] [--words] [--max-line-length] [file...]
```
## Options
@ -15,6 +15,7 @@ $ wc [--lines] [--bytes] [--words] [file...]
* `-l`, `--lines`: Output line count
* `-c`, `--bytes`: Output byte count
* `-w`, `--words`: Output word count
* `-L`, `--max-line-length`: Output byte count of the longest line
## Arguments