mirror of
https://github.com/nushell/nushell
synced 2024-12-27 21:43:09 +00:00
420 B
420 B
title | layout | version |
---|---|---|
any? | command | 0.59.1 |
Tests if any element of the input matches a predicate.
Signature
> any? (predicate)
Parameters
predicate
: the predicate that must match
Examples
Find if a service is not running
> echo [[status]; [UP] [DOWN] [UP]] | any? status == DOWN
Check if any of the values is odd
> echo [2 4 1 6 8] | any? ($it mod 2) == 1