Revision 12971
Added by Aaron Marcuse-Kubitza almost 11 years ago
util.sh | ||
---|---|---|
69 | 69 |
|
70 | 70 |
not() { ! "$@"; } # usage: wrapper_cmd not wrapped_cmd... # inverts exit status |
71 | 71 |
|
72 |
bool!() # usage: "$(bool! "$bool_var")" |
|
73 |
{ if test ! "$1"; then echo -n 1; fi } # empty<->non-empty |
|
72 | 74 |
|
75 |
|
|
73 | 76 |
#### vars |
74 | 77 |
|
75 | 78 |
alias local_array='declare' |
Also available in: Unified diff
lib/sh/util.sh: added bool!()