From owner-freebsd-questions@FreeBSD.ORG Fri Sep 12 17:21:45 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4B9A16A4BF for ; Fri, 12 Sep 2003 17:21:45 -0700 (PDT) Received: from lerami.lerctr.org (lerami.lerctr.org [207.158.72.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F33B43FAF for ; Fri, 12 Sep 2003 17:21:44 -0700 (PDT) (envelope-from ler@lerctr.org) Received: from lerlaptop.lerctr.org (lerlaptop.lerctr.org [207.158.72.14]) (authenticated bits=0)h8D0Le98015332; Fri, 12 Sep 2003 19:21:41 -0500 (CDT) Date: Fri, 12 Sep 2003 19:21:37 -0500 From: Larry Rosenman To: James Long Message-ID: <13950000.1063412497@lerlaptop.lerctr.org> In-Reply-To: <20030913001150.GA5743@ns.museum.rain.com> References: <024201c37283$60b7b400$0800a8c0@master> <88930000.1062638899@lerlaptop.lerctr.org> <20030913001150.GA5743@ns.museum.rain.com> X-Mailer: Mulberry/3.1.0b7 (Linux/x86) X-PGP-Info: All other keys are old/dead. X-PGP-Key: 0x3c49bdd6 X-PGP-Fingerprint: D0D1 3C11 F42F 6B29 FA67 6BF3 AD13 4685 3C49 BDD6 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="==========EEA920EB1D709571AB46==========" X-Virus-Scanned: by amavisd-milter (http://amavis.org/) cc: freebsd-questions@freebsd.org Subject: Re: How do I change the extensions on a slew of files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2003 00:21:45 -0000 --==========EEA920EB1D709571AB46========== Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline --On Friday, September 12, 2003 17:11:50 -0700 James Long=20 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=3D`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=3D`echo $i | sed -e "s/inc$/htm/g"` > > is better, no? Yep, and some other kind folks pointed this out. Thanks, LER --=20 Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 --==========EEA920EB1D709571AB46========== Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/YmMUrRNGhTxJvdYRAmQQAJ93RYvqCkX6AulwaP6TrZRu+Cl1aACgmavq Z5gF77SBdqg7Zt+5GHDyoq0= =NufU -----END PGP SIGNATURE----- --==========EEA920EB1D709571AB46==========--