First pass at updating all documentation formatting and cleaning up output of examples (#2031)

This commit is contained in:
Joseph T. Lyons
2020-06-23 14:21:47 -04:00
committed by GitHub
parent d095cb91e4
commit 053bd926ec
81 changed files with 1069 additions and 679 deletions

View File

@ -1,14 +1,17 @@
# skip-while
Skips rows while the condition matches.
Skips rows while the condition matches.
## Usage
```shell
> [input-command] | skip-while <condition>
```
## Examples
If we open a file with a list of contacts, we get all of the contacts.
If we open a file with a list of contacts, we get all of the contacts.
```shell
> open contacts.csv | sort-by "last name"
───┬────────────┬───────────┬──────────────────
@ -21,7 +24,8 @@ If we open a file with a list of contacts, we get all of the contacts.
───┴────────────┴───────────┴──────────────────
```
To exclude skip contacts with last names startin with 'A' or 'B', use skip-while:
To exclude skip contacts with last names starting with 'A' or 'B', use skip-while:
```shell
> open contacts.csv | sort-by "last name" | skip-while "last name" < "C"
───┬────────────┬───────────┬──────────────────
@ -33,6 +37,7 @@ To exclude skip contacts with last names startin with 'A' or 'B', use skip-while
```
Note that the order of input rows matters. Once a single row does not match the condition, all following rows are included in the output, whether or not they match the condition:
```shell
> open contacts.csv | skip-while "last name" < "C"
───┬────────────┬───────────┬──────────────────
@ -43,4 +48,5 @@ Note that the order of input rows matters. Once a single row does not match the
2 │ Francis │ Davis │ davis@email.com
───┴────────────┴───────────┴──────────────────
```
See the `where` command to filter each individual row by a condition, regardless of order.
See the `where` command to filter each individual row by a condition, regardless of order.