Clamp a number between a max and a min.
Creating sparse files for loopback images can be done with the dd command. The ascii_only strips all non-ascii characters out of a string.