A quick (and dirty?) solution could be to pipe your directory names through cat -n
in their proper order and then remove the whitespace separating the line number from the directory name, before passing them to xargs
.
A better solution would be to modify your awk
command:
... | awk '{ print NR "." $2 }' | xargs mkdir -p
The NR
variable contains the record (i.e. line) number.