Spec-Zone.ru › Nushell

while for core

Conditionally run a block in a loop.

Signature

> while {flags} (cond) (block)

Parameters

  • cond: Condition to check.
  • block: Block to loop if check succeeds.

Input/output types:

input output
nothing nothing

Examples

Loop while a condition is true.

> mut x = 0; while $x < 10 { $x = $x + 1 }

Notes

This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/while.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API