Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: renaming with number prefix
- X-seq: zsh-users 1258
- From: Bruce Stephens <B.Stephens@xxxxxxxxx>
- To: ZShell Users <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: renaming with number prefix
- Date: Fri, 23 Jan 1998 16:24:54 +0000
- In-reply-to: Your message of "Fri, 23 Jan 1998 16:54:04 +0100." <19980123165404.53612@xxxxxxxxxxxxxxxxx>
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