Is there a shell command that simply converts back and forth between a number string in bytes and the \"human-readable\" number string offered by some commands via the -h
-h
There is no standard (cross-platform) tool to do it. But solution using awk is described here
awk
numfmt
To:
echo "163564736" | numfmt --to=iec
From:
echo "156M" | numfmt --from=iec