2014-01-28 21:37:00 +10:00
|
|
|
This directory contains code snippets that can be reused by multiple
|
2011-06-09 21:08:40 +10:00
|
|
|
scripts. A brief description of each file follows.
|
|
|
|
|
2012-04-25 22:27:19 -04:00
|
|
|
human_to_size.sh:
|
|
|
|
A function to convert human readable sizes (such as "5.3 GiB") to raw byte
|
|
|
|
equivalents. base10 and base2 suffixes are supported, case sensitively. If
|
|
|
|
successful, the converted byte value is written to stdout and the function
|
2018-12-09 18:31:50 +01:00
|
|
|
returns 0. If an error occurs, nothing is written and the function returns 1.
|
2012-04-25 22:27:19 -04:00
|
|
|
Results may be inaccurate when using a broken implementation of awk, such
|
|
|
|
as mawk or busybox awk.
|