diff options
author | Thomas Voss <mail@thomasvoss.com> | 2022-09-27 20:54:19 +0200 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2022-10-06 16:06:50 +0100 |
commit | 5a4ee4df342f64efb5259c23438b0c6b0e734a65 (patch) | |
tree | 066467f8f049a9b38be7eb9f9407b5f48867e1a2 /Base/usr/share/man | |
parent | b556bfe8eb4df813e0758b3d39c0ac77dc1ac86e (diff) | |
download | serenity-5a4ee4df342f64efb5259c23438b0c6b0e734a65.zip |
rev: Document the '-' filename
Diffstat (limited to 'Base/usr/share/man')
-rw-r--r-- | Base/usr/share/man/man1/rev.md | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Base/usr/share/man/man1/rev.md b/Base/usr/share/man/man1/rev.md index d2aed40419..a89cc040d5 100644 --- a/Base/usr/share/man/man1/rev.md +++ b/Base/usr/share/man/man1/rev.md @@ -5,14 +5,19 @@ rev - reverse lines ## Synopsis ```*sh -$ rev [files...] +$ rev [file...] ``` ## Description `rev` reads the specified files line by line, and prints them to standard output with each line being reversed characterwise. If no files are specified, -then `rev` will read from standard input. +then `rev` will read from standard input. If the file `-` is specified then +`rev` also reads from standard input. + +## Arguments + +* `file`: Files to print ## Examples @@ -39,3 +44,18 @@ $ ls | rev oof rab ``` + +To print a file 'foo' in reverse followed by the output of `ls` in reverse: +```sh +$ cat foo +foo 1 +foo 2 +$ ls +foo +bar +$ ls | rev foo - +1 oof +2 oof +oof +rab +``` |