Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: renaming with number prefix



guckes@xxxxxxxxxxxxxxxxx said:
> Rename all files within a directory such that their names get a
> numeral prefix in the default sort order. 

What about:

i=1; for j in *; do mv $j $i.$j; ((i++)); done




Messages sorted by: Reverse Date, Date, Thread, Author