From owner-freebsd-questions Fri Dec 11 08:43:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA27514 for freebsd-questions-outgoing; Fri, 11 Dec 1998 08:43:26 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from horton.iaces.com (horton.iaces.com [204.147.87.98]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA27508 for ; Fri, 11 Dec 1998 08:43:24 -0800 (PST) (envelope-from proot@horton.iaces.com) Received: (from proot@localhost) by horton.iaces.com (8.8.8/8.8.8) id KAA04666; Fri, 11 Dec 1998 10:43:14 -0600 (CST) (envelope-from proot) From: "Paul T. Root" Message-Id: <199812111643.KAA04666@horton.iaces.com> Subject: Re: Basic mv question? In-Reply-To: <36714876.A3B825A4@lundahl.com> from "James A. Taylor" at "Dec 11, 98 09:29:42 am" To: jataylor@lundahl.com (James A. Taylor) Date: Fri, 11 Dec 1998 10:43:13 -0600 (CST) Cc: freebsd-questions@FreeBSD.ORG X-Organization: USWEST !nterprise Networking - ACES X-Phone: (612) 664-3385 X-Fax: (612) 664-4779 X-Page: (800) SKY-PAGE PIN: 537-7270 X-Address: 600 Stinson Blvd, Fl 1S X-Address: Minneapolis, MN 55413 X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG When you use more that 2 args on mv or cp, the last one is the destination, the rest are source. #!/bin/sh for i in *.shtml do j=`basename $i .shtml` mv $i $j.html done In a previous message, James A. Taylor said: > I have a directory tree full of *.shtml files. > I assumed that I could recursively rename all of > the *.shtml files in that directory tree to *.html > files. When I tried I got a usage message and > from what I can tell the FreeBSD commands > mv and cp do not take wild cards. > > Is this true? Is it really true that I can't issue a > command like mv *.shtml *.html? > > Help! > > James A. Taylor > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -- The follies which a man regrets most, in his life, are those which he didn't commit when he had the opportunity. - - Helen Rowland To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message