[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: scripting question

On Wed, Jul 01, 2009 at 07:22:33AM -0700, Marc Shapiro wrote:
> I am sure that this is an easy question for those people who do any  
> reasonable amount of scripting.  I'm just not one of them.
> How can I rename all of the files ina directory with the new name being  
> the old name stripped of its leftmost three characters.  If all of the  
> files are off the format:
> 	xxxyyyyyyyyyyyyyyyyyyyyy.zzz
> I want the new names to be of the format:
> 	yyyyyyyyyyyyyyyyyyyyy.zzz

for file in `ls all the files` ; do mv $file ${file#xxx}; done

Reply to: