From owner-freebsd-questions Thu Mar 4 11:31: 7 1999 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 8140E1510F for ; Thu, 4 Mar 1999 11:31:03 -0800 (PST) (envelope-from ben@scientia.demon.co.uk) Received: from scientia.demon.co.uk (ident=ben) by scientia.demon.co.uk with local (Exim 2.12 #12) id 10IdWc-000357-00; Thu, 4 Mar 1999 19:11:14 +0000 (envelope-from ben@scientia.demon.co.uk) Date: Thu, 4 Mar 1999 19:11:14 +0000 From: Ben Smithurst To: Keith Anderson Cc: questions@freeBSD.org Subject: Re: omething simple (sorry) Message-ID: <19990304191114.A11792@scientia.demon.co.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Keith Anderson wrote: > I have looked and I can't find how to move bulk files with wildcards > > in dos I would use copy *.txt *.old Cp and mv can't do this alone, since your shell will expand the wilcards before they see them. And if you protect the wildcard characters, cp and mv won't expand them at all. Try something like this, in /bin/sh and friends: for i in *.txt; do mv $i $(basename $i .txt); done Replace "mv" with "cp" if you want to copy rather than just move/rename the files. -- Ben Smithurst ben@scientia.demon.co.uk send a blank message to ben+pgp@scientia.demon.co.uk for PGP key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message