[wplug] changing extensions?
Mike Griffin
mike at nbi.edu
Wed Mar 28 11:49:42 EST 2007
Point noted.
Best to keep with my first example, which will work in every instance.
-Mike
-----Original Message-----
From: wplug-bounces+mike=nbi.edu at wplug.org
[mailto:wplug-bounces+mike=nbi.edu at wplug.org] On Behalf Of James O'Kane
Sent: Wednesday, March 28, 2007 12:16 PM
To: General user list
Subject: Re: [wplug] changing extensions?
On Tue, 27 Mar 2007, Mike Griffin wrote:
>
> If you forget 'basename', remember you can use 'cut' in pretty much
> the same fashion.
>
> for i in *.htm; do mv $i `ls $i | cut -d\. -f1`.html; done
$ ls
odd.name.htm
$ for i in *.htm; do mv $i `ls $i | cut -d\. -f1`.html; done $ ls odd.html
More information about the wplug
mailing list