1 |
On Thu, 27 Oct 2016 18:18:36 -0400, Philip Webb wrote: |
2 |
|
3 |
> > I know it is a smart-arse answer, but it's better for sore eyes |
4 |
> > if you rename your files to unique-width numbers. |
5 |
> > $ for f in image* ; do mv $f image_`printf %03d ${f##image}` ; done |
6 |
> > This works for zsh and may need slight changes for bash. |
7 |
> |
8 |
> That's what I ended up doing, a job for a very rainy today. |
9 |
> I did it with 'rename', which is fairly powerful, |
10 |
> but dangerous if you don't concentrate, as it will overwrite files. |
11 |
|
12 |
Have a look at renamexm from sys-apps/rename (it's actually called rename |
13 |
but for Gentoo is was renamed to avoid a collision). It has a lot more |
14 |
options than rename and defaults to prompting you if you try to rename to |
15 |
an existing file. |
16 |
|
17 |
|
18 |
-- |
19 |
Neil Bothwick |
20 |
|
21 |
"Insanity: doing the same thing over and over again and expecting |
22 |
different results." (Albert Einstein) |