Date: Wed, 31 Jan 2001 07:36:42 -0500 From: Eric Johnson <eric@coding-zone.com> To: Ana Romero <anar@ees2.oulu.fi> Cc: Questions FreeBSD <questions@freeBSD.org> Subject: Re: fast answer is needed about commands Message-ID: <20010131073642.A13574@h0040f6849012.ne.mediaone.net> In-Reply-To: <Pine.GSO.4.30.0101311419040.22753-100000@stekt56>; from anar@ees2.oulu.fi on Wed, Jan 31, 2001 at 02:24:21PM %2B0200 References: <Pine.GSO.4.30.0101311419040.22753-100000@stekt56>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 31, 2001 at 02:24:21PM +0200, Ana Romero wrote: > > HI!! > > I have many files named like XXX-new which I want to move to XXX. I > mean, > > mv XXX-new XXX > > > Can I do it in once in some way? I mean, I would like to do > > mv *-new * > > but it is not allowed many ways to do this, but you could type the following commands into your /bin/sh or /usr/local/bin/bash prompt. of course, you have to be in the directory where the files are located... for i in *-new do f=`echo $i | tr -d -- -new` mv $i $f done -- Best Regards, Eric Johnson (eric@coding-zone.com && http://www.coding-zone.com) Cthulhu for President! (If you're tired of choosing the lesser of two evils.) 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?20010131073642.A13574>