numfmt
Convert numbers to and from human-readable strings. tldr-pages
On several platforms
Several platforms
Convert 1.5K (SI Units) to 1500
numfmt --from si 1.5KIdentifyConvert 1500 to 1.5K (SI Units)
numfmt --to si 1500IdentifyConvert 1.5K (IEC Units) to 1536
numfmt --from iec 1.5KIdentifyUse appropriate conversion based on the suffix
numfmt --from auto 1.5KiIdentifyConvert 5th field (1-indexed) to IEC Units without converting header
ls -l | numfmt --header=1 --field 5 --to iecIdentify-llong (show full details) toyboxConvert to IEC units, pad with 5 characters, left aligned
du --summarize * | numfmt --to iec --format "%-5f"Identify