Letting round_down_div_million() convert small numbers to 0
This commit is contained in:
parent
a28ad87aae
commit
98c301e7b9
@ -117,8 +117,18 @@ print_usage() {
|
||||
|
||||
# Roughly convert human readable sizes and plain numbers to 1 / million
|
||||
round_down_div_million() {
|
||||
sed -e 's/\.[0-9]*//' -e 's/[0-9][0-9][0-9][0-9][0-9][0-9]$//' \
|
||||
-e 's/[Mm]//' -e 's/[Gg]/000/' -e 's/[Tt]/000000/'
|
||||
sed \
|
||||
-e 's/^[0-9][0-9][0-9][0-9][0-9][0-9]$/0/' \
|
||||
-e 's/^[0-9][0-9][0-9][0-9][0-9]$/0/' \
|
||||
-e 's/^[0-9][0-9][0-9][0-9]$/0/' \
|
||||
-e 's/^[0-9][0-9][0-9]$/0/' \
|
||||
-e 's/^[0-9][0-9]$/0/' \
|
||||
-e 's/^[0-9]$/0/' \
|
||||
-e 's/\.[0-9]*//' \
|
||||
-e 's/[0-9][0-9][0-9][0-9][0-9][0-9]$//' \
|
||||
-e 's/[Mm]$//' \
|
||||
-e 's/[Gg]$/000/' \
|
||||
-e 's/[Tt]$/000000/'
|
||||
}
|
||||
|
||||
### Assessing arguments and setting up the job
|
||||
|
Loading…
Reference in New Issue
Block a user