blob: 71b93e680dd6afe24310d9d17246f14e95285244 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
.TH any 1 2022-05-27 utils
.SH NAME
any \- logical or operator
.SH SYNOPSIS
.B or
.RI [ arg\ ... ]
.SH DESCRIPTION
.B any
evaluates each parameter according to the
.BR bash (1)
built-in
.B test
until the first the evaluates to true.
Returns false if all parameters evaluate to false.
If no parameters are passed, returns true.
The shell may omit parameters
that would evaluate to false.
Admittedly, this is not as useful as it could be.
As
.B or
does not run any commands, it cannot be used for lazy evaluation.
.SH EXIT STATUS
.TP
.B 0
Not all parameters evaluate to false.
.TP
.B 1
All parameters evaluate to false.
.SH EXAMPLES
.B or
"$a" "$b" "$c"
.SH SEE ALSO
.BR all (1),\ xargs (1),\ map (1),\ fmap (1)
|