mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 18:59:06 +02:00
First pass at updating all documentation formatting and cleaning up output of examples (#2031)
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user