[ale] help with batch file renaming

Jerry Yu z.yu at voicecom.com
Mon Aug 4 12:20:32 EDT 2003


	how about this little for loop and a little SED?

----------- cut ------- cut -------
for i in 2003*.jpg
do
	j=`echo $i | sed -e 's/y_B/y_Jo_B/g'`
	mv $i $j
done

On 4 Aug 2003, Greg Freemyer wrote:

#On Sat, 2003-08-02 at 23:17, Jim Seymour wrote:
#> I have a number of image files I need to rename.  Example:
#> 
#> 2003_Billy_Bob_01.jpg
#> 2003_Billy_Bob_02.jpg
#> 
#> to
#> 
#> 2003_Billy_Jo_Bob_01.jpg
#> 2003_Billy_Jo_Bob_02.jpg
#> 
#> There may be 50 or more files I need to rename at a time.  I have been 
#> playing with rename to no avail.  Anyone know a bash script or something 
#> to make my life easier?
#> 
#
#I've never used mmv, but I think it is designed to do this.
#
#It is part of the SuSE distro, don't know about others.
#
#Greg
#-- 
#Greg Freemyer
#
#_______________________________________________
#Ale mailing list
#Ale at ale.org
#http://www.ale.org/mailman/listinfo/ale
#

Jerry Yu				+1-404-487-8544 (O)
systems engineer			jerry.yu at voicecom.com
is support, voicecom, llc		www.voicecom.com

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list