503dd40af899ae13da0682ae92a061ba932a96a6
3 remove_leading_zeroes
() {
4 # Desc: Removes leading zeroes from lines
7 # Depends: BK-2020-03 read_stdin()
10 printf "%s\n" "$line" |
sed -E -e 's/(^0*)([0-9].*)/\2/';
14 printf "00000.jpg\n0001.jpg\n2.jpg\n000003.jpg\n0010.jpg\n";
15 printf "========================\n";
16 printf "00000.jpg\n0001.jpg\n2.jpg\n000003.jpg\n0010.jpg\n" | remove_leading_zeroes
;