Re: bulk rename pod1 > pod2 needed

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: James Mcphee
Date:  
To: Dennis Kibbe, Main PLUG discussion list
Subject: Re: bulk rename pod1 > pod2 needed
assuming you're just trimming off ccna, pc1, and ext

for i in $( ls )
do
mv $i $( echo $i | awk -F. '{ print $3 }' )
done

That would move them to pod# names.

On Mon, Feb 16, 2009 at 5:33 PM, Dennis Kibbe <>wrote:

> Can someone suggest a way to rename a directory of files like this:
>
> ccna.pod1.pc1.ext is renamed to ccna.pod2.pc1.ext
> ccna.pod2.pc1.ext is renamed to ccna.pod3.pc1.ext
>
> and so on.
>
> (Aside: Hans, if I were able to take your scripting class I won't be asking
> this now. :-)
>
> Dennisk
>
> --
> "Free as in Freedom"
> Free Software Foundation
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>




--
James McPhee

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss