forked from extern/nushell
c0a1d18e3d
* feat: update #4455, regenerate commands' docs * chore: update make_docs script
28 lines
403 B
Markdown
28 lines
403 B
Markdown
---
|
|
title: all?
|
|
layout: command
|
|
version: 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
|
|
```shell
|
|
> echo [[status]; [UP] [UP]] | all? status == UP
|
|
```
|
|
|
|
Check that all values are even
|
|
```shell
|
|
> echo [2 4 6 8] | all? ($it mod 2) == 0
|
|
```
|