1
0
mirror of https://github.com/nushell/nushell.git synced 2025-08-16 00:58:14 +02:00
Files
nushell/docs/commands/any.md
Justin Ma c0a1d18e3d update , regenerate commands' docs and update make_docs script ()
* feat: update , regenerate commands' docs

* chore: update make_docs script
2022-02-21 11:26:00 -06:00

420 B

title, layout, version
title layout version
any? command 0.59.0

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