mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
rev: Document the '-' filename
This commit is contained in:
parent
b556bfe8eb
commit
5a4ee4df34
1 changed files with 22 additions and 2 deletions
|
@ -5,14 +5,19 @@ rev - reverse lines
|
||||||
## Synopsis
|
## Synopsis
|
||||||
|
|
||||||
```*sh
|
```*sh
|
||||||
$ rev [files...]
|
$ rev [file...]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
`rev` reads the specified files line by line, and prints them to standard
|
`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,
|
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
|
## Examples
|
||||||
|
|
||||||
|
@ -39,3 +44,18 @@ $ ls | rev
|
||||||
oof
|
oof
|
||||||
rab
|
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
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue