Skip to content

Instantly share code, notes, and snippets.

View benwhorwood's full-sized avatar

Ben Whorwood benwhorwood

View GitHub Profile
#!/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}
#!/bin/bash
ctr=1
while true; do
paddednum=$(printf "%05d" $ctr)
echo ffmpeg... $paddednum
sleep 1