Revision 9538
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
142 | 142 |
|
143 | 143 |
bool2int() { try test ! "$1"; echo "$e"; } # empty->0; non-empty->1 |
144 | 144 |
|
145 |
int2bool() { (( "$1" != 0 )); } |
|
145 | 146 |
|
147 |
|
|
146 | 148 |
#### floats |
147 | 149 |
|
148 | 150 |
int_part() { echo "${1%%.*}"; } |
Also available in: Unified diff
lib/sh/util.sh: added int2bool()