How do I change the extensions on a slew of files
Larry Rosenman
ler at lerctr.org
Fri Sep 12 17:21:45 PDT 2003
--On Friday, September 12, 2003 17:11:50 -0700 James Long
<james_mapson at umpquanet.com> wrote:
> On Wed, Sep 03, 2003 at 08:28:19PM -0500, Larry Rosenman wrote:
>>
>>
>> from an sh type shell
>> for i in *.inc
>> do
>> z=`echo $i | sed -e "s/inc/htm/g"`
>> mv ${i} ${z}
>> done
>>
>> (not tested, but should work.)
>>
>> LER
>
> What does it do with a file named
>
> include.inc
>
> z=`echo $i | sed -e "s/inc$/htm/g"`
>
> is better, no?
Yep, and some other kind folks pointed this out.
Thanks,
LER
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler at lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030912/2d847d28/attachment.bin
More information about the freebsd-questions
mailing list