[wplug] changing extensions?
Moshe Katz-Hyman
mokatz at gmail.com
Tue Mar 27 12:51:27 EST 2007
I had forgotten basename did that. I always end up mucking around
with bash ${pattern%%suffix} subsititutions which I invariably screw
up (most likely that one, too), having to go back to the the man page,
then just saying, "Aw, screw it!" and doing it by hand. :P
Moshe
On 3/27/07, Mike Griffin <mike at nbi.edu> wrote:
>
> Easy enough to add a letter to the end of a file name, but let's change the
> entire file extension to answer later questions.
>
> for i in *.htm; do mv $i `basename $i .htm`.html; done
>
>
>
> -----Original Message-----
> From: wplug-bounces+mike=nbi.edu at wplug.org
> [mailto:wplug-bounces+mike=nbi.edu at wplug.org] On Behalf Of Zach
> Sent: Tuesday, March 27, 2007 1:07 AM
> To: General user list
> Subject: [wplug] changing extensions?
>
> Evening,
>
> I have many files (thousands) which end in .htm and I would like changed to
> .html (mainly for aesthetic purposes I prefer this) is there a nice Linux
> automated way I can do this from command line?
>
> Zach
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
More information about the wplug
mailing list