Created
May 22, 2016 06:08
-
-
Save benwhorwood/aa08962f5f70544cc1581baaad59ce86 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for i in *.jpg; do mv $i $(../zeropad.sh $i); done | |
num=`expr match "$1" '[^0-9]*\([0-9]\+\).*'` | |
paddednum=`printf "%05d" $num` | |
echo ${1/$num/$paddednum} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment