mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
doc update
This commit is contained in:
@ -338,6 +338,8 @@ $ cat table.txt | jc 1:-1 --asciitable
|
|||||||
$ cat table.txt | jc 1:4 --asciitable
|
$ cat table.txt | jc 1:4 --asciitable
|
||||||
[{"col1":"foo","col2":"1"},{"col1":"bar","col2":"1"}]
|
[{"col1":"foo","col2":"1"},{"col1":"bar","col2":"1"}]
|
||||||
```
|
```
|
||||||
|
In this example `1:-1` and `1:4` line slices provide the same output.
|
||||||
|
|
||||||
Notice how when using positive integers the index location of `STOP` is
|
Notice how when using positive integers the index location of `STOP` is
|
||||||
non-inclusive. Positive slices count from the first line of the output
|
non-inclusive. Positive slices count from the first line of the output
|
||||||
toward the end starting at `0` as the first line. Negative slices count from
|
toward the end starting at `0` as the first line. Negative slices count from
|
||||||
@ -354,7 +356,7 @@ Here is a quick breakdown:
|
|||||||
| `:STOP` | lines from the beginning through `STOP - 1` |
|
| `:STOP` | lines from the beginning through `STOP - 1` |
|
||||||
| `-START:STOP` | `START` lines from the end through `STOP - 1` |
|
| `-START:STOP` | `START` lines from the end through `STOP - 1` |
|
||||||
| `START:-STOP` | lines `START` through `STOP` lines from the end |
|
| `START:-STOP` | lines `START` through `STOP` lines from the end |
|
||||||
| `-START:` | `START` lines from the end through the rest or the output |
|
| `-START:` | `START` lines from the end through the rest of the output |
|
||||||
| `:-STOP` | lines from the beginning through `STOP` lines from the end |
|
| `:-STOP` | lines from the beginning through `STOP` lines from the end |
|
||||||
| `:` | all lines |
|
| `:` | all lines |
|
||||||
|
|
||||||
|
@ -200,6 +200,8 @@ $ cat table.txt | jc 1:-1 --asciitable
|
|||||||
$ cat table.txt | jc 1:4 --asciitable
|
$ cat table.txt | jc 1:4 --asciitable
|
||||||
[{"col1":"foo","col2":"1"},{"col1":"bar","col2":"1"}]
|
[{"col1":"foo","col2":"1"},{"col1":"bar","col2":"1"}]
|
||||||
```
|
```
|
||||||
|
In this example `1:-1` and `1:4` line slices provide the same output.
|
||||||
|
|
||||||
Notice how when using positive integers the index location of `STOP` is
|
Notice how when using positive integers the index location of `STOP` is
|
||||||
non-inclusive. Positive slices count from the first line of the output
|
non-inclusive. Positive slices count from the first line of the output
|
||||||
toward the end starting at `0` as the first line. Negative slices count from
|
toward the end starting at `0` as the first line. Negative slices count from
|
||||||
@ -216,7 +218,7 @@ Here is a quick breakdown:
|
|||||||
| `:STOP` | lines from the beginning through `STOP - 1` |
|
| `:STOP` | lines from the beginning through `STOP - 1` |
|
||||||
| `-START:STOP` | `START` lines from the end through `STOP - 1` |
|
| `-START:STOP` | `START` lines from the end through `STOP - 1` |
|
||||||
| `START:-STOP` | lines `START` through `STOP` lines from the end |
|
| `START:-STOP` | lines `START` through `STOP` lines from the end |
|
||||||
| `-START:` | `START` lines from the end through the rest or the output |
|
| `-START:` | `START` lines from the end through the rest of the output |
|
||||||
| `:-STOP` | lines from the beginning through `STOP` lines from the end |
|
| `:-STOP` | lines from the beginning through `STOP` lines from the end |
|
||||||
| `:` | all lines |
|
| `:` | all lines |
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user