nushell/docs/commands/keep.md
Fernando Herrera dbcadbc12c moved folders
2022-02-07 19:23:12 +00:00

492 B

keep

Keep the number of rows only.

Usage

> keep (rows) <subcommand> {flags} 

Subcommands

  • keep until - Keeps rows until the condition matches.
  • keep while - Keeps rows while the condition matches.

Parameters

  • (rows) Starting from the front, the number of rows to keep

Flags

  • -h, --help: Display this help message

Examples

Keep the first row

> echo [1 2 3] | keep

Keep the first four rows

> echo [1 2 3 4 5] | keep 4