Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 1998 10:43:13 -0600 (CST)
From:      "Paul T. Root" <proot@horton.iaces.com>
To:        jataylor@lundahl.com (James A. Taylor)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Basic mv question?
Message-ID:  <199812111643.KAA04666@horton.iaces.com>
In-Reply-To: <36714876.A3B825A4@lundahl.com> from "James A. Taylor" at "Dec 11, 98 09:29:42 am"

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812111643.KAA04666>