mkdir $(printf "%03i" $(seq 1 21)) for i in $(seq 1 21); do mv "$(printf "%03i" $i).scm" "$(printf "%03i" $i)/" done