Project

General

Profile

« Previous | Next » 

Revision 9538

lib/sh/util.sh: added int2bool()

View differences:

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