pad with zeros
public shellscript v1 · immutable#!/bin/bashNUM1=2NUM2=30if [ "$NUM" -lt 10 ] ; then NUM="0${NUM}" ;elif [ "$NUM" -lt 100 ] ; then NUM="00${NUM}" ;elif [ "$NUM" -lt 1000 ] ; then NUM="000${NUM}" ;else echo "abort"fi#!/bin/bashNUM1=2NUM2=30if [ "$NUM" -lt 10 ] ; then NUM="0${NUM}" ;elif [ "$NUM" -lt 100 ] ; then NUM="00${NUM}" ;elif [ "$NUM" -lt 1000 ] ; then NUM="000${NUM}" ;else echo "abort"fi