nushell/docs/commands/all.md
JT 8c0a2d3c15
Auto-generate markdown command docs (#4451)
* Finish updating

* a couple improvements

* Update renames

* cleanup examples
2022-02-13 21:22:51 -05:00

404 B

title layout version
all? command 0.59.0

Test if every element of the input matches a predicate.

Signature

> all? (predicate)

Parameters

  • predicate: the predicate that must match

Examples

Find if services are running

> echo [[status]; [UP] [UP]] | all? status == UP

Check that all values are even

> echo [2 4 6 8] | all? ($it mod 2) == 0