mirror of
https://github.com/nushell/nushell.git
synced 2025-08-11 05:33:59 +02:00
Auto-generate markdown command docs (#4451)
* Finish updating * a couple improvements * Update renames * cleanup examples
This commit is contained in:
@ -1,25 +1,28 @@
|
||||
# any?
|
||||
Find if the table rows matches the condition.
|
||||
---
|
||||
title: any?
|
||||
layout: command
|
||||
version: 0.59.0
|
||||
---
|
||||
|
||||
## Usage
|
||||
```shell
|
||||
> any? <condition> {flags}
|
||||
```
|
||||
Tests if any element of the input matches a predicate.
|
||||
|
||||
## Signature
|
||||
|
||||
```> any? (predicate)```
|
||||
|
||||
## Parameters
|
||||
* `<condition>` the condition that must match
|
||||
|
||||
## Flags
|
||||
* -h, --help: Display this help message
|
||||
- `predicate`: the predicate that must match
|
||||
|
||||
## Examples
|
||||
Find if a service is not running
|
||||
|
||||
Find if a service is not running
|
||||
```shell
|
||||
> echo [[status]; [UP] [DOWN] [UP]] | any? status == DOWN
|
||||
```
|
||||
```
|
||||
|
||||
Check if any of the values is odd
|
||||
Check if any of the values is odd
|
||||
```shell
|
||||
> echo [2 4 1 6 8] | any? ($it mod 2) == 1
|
||||
```
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user