kellyjonbrazil / jc

CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
MIT License
7.93k stars 209 forks source link

Incorrect handling of "k" "K" and similar suffixes for df, should be binary #592

Closed cdleonard closed 15 hours ago

cdleonard commented 2 months ago

Running df -Bk or df -BK is equivalent to df -BKiB but jc handles this as equivalent to df -BKB.

Coreutils handling of k/K as identical to KiB is documented here: https://www.gnu.org/software/coreutils/manual/html_node/Block-size.html, not sure how other systems handle this.

As a workaround it is possible to run df -BKB or df -BKiB explicitly

kellyjonbrazil commented 2 months ago

This is fixed in dev and will make it in the next release.

kellyjonbrazil commented 15 hours ago

Now available in release v1.25.4