From owner-freebsd-questions@FreeBSD.ORG Fri Sep 12 17:11:54 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 A935816A4BF for ; Fri, 12 Sep 2003 17:11:54 -0700 (PDT) Received: from ns.museum.rain.com (gw-ipinc.museum.rain.com [206.29.169.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id B61C443FD7 for ; Fri, 12 Sep 2003 17:11:53 -0700 (PDT) (envelope-from james_mapson@umpquanet.com) Received: from ns.museum.rain.com (localhost [127.0.0.1]) by ns.museum.rain.com (8.12.9/8.12.9) with ESMTP id h8D0Bp7k005777; Fri, 12 Sep 2003 17:11:52 -0700 (PDT) (envelope-from james@umpquanet.com) Received: (from james@localhost) by ns.museum.rain.com (8.12.9/8.12.9/Submit) id h8D0Bo2l005776; Fri, 12 Sep 2003 17:11:50 -0700 (PDT) (envelope-from james) Date: Fri, 12 Sep 2003 17:11:50 -0700 From: James Long To: Larry Rosenman Message-ID: <20030913001150.GA5743@ns.museum.rain.com> References: <024201c37283$60b7b400$0800a8c0@master> <88930000.1062638899@lerlaptop.lerctr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88930000.1062638899@lerlaptop.lerctr.org> User-Agent: Mutt/1.4.1i X-Spam-Status: No, hits=-4.5 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_MUTT version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) 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:11:54 -0000 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?