Re: Renaming groups of files modifying only a character
- From: "Chris F.A. Johnson" <cfajohnson@xxxxxxxxx>
- Date: Tue, 11 Jul 2006 11:06:13 -0400
On 2006-07-11, Shaman wrote:
How could I modify groups of files which are defined by a progressive
number, like:
100**.example
varying just a char:
101**.example
Some systems have a rename command; for those that don't:
n=100
for file in 100*.example
do
mv -i -- "$file" "$n${file#100}"
n=$(( $n + 1 ))
done
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
.
- References:
- Renaming groups of files modifying only a character
- From: Shaman
- Renaming groups of files modifying only a character
- Prev by Date: Re: Renaming groups of files modifying only a character
- Next by Date: Re: Renaming groups of files modifying only a character
- Previous by thread: Re: Renaming groups of files modifying only a character
- Next by thread: Re: Renaming groups of files modifying only a character
- Index(es):
Relevant Pages
|
|