From owner-freebsd-newbies Wed May 24 4:45:48 2000 Delivered-To: freebsd-newbies@freebsd.org Received: from cx344940-a.meta1.la.home.com (cx344940-a.meta1.la.home.com [24.6.21.74]) by hub.freebsd.org (Postfix) with ESMTP id 3E70637B522 for ; Wed, 24 May 2000 04:45:46 -0700 (PDT) (envelope-from conrads@cx344940-a.meta1.la.home.com) Received: (from conrads@localhost) by cx344940-a.meta1.la.home.com (8.9.3/8.9.3) id GAA42916; Wed, 24 May 2000 06:45:45 -0500 (CDT) (envelope-from conrads) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20000523133922.31498.qmail@hotmail.com> Date: Wed, 24 May 2000 06:45:44 -0500 (CDT) Organization: @Home Network From: Conrad Sabatier To: "Dimitrios T." Subject: RE: I've tried them all. They all work :) Cc: freebsd-newbies@FreeBSD.ORG Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 23-May-00 Dimitrios T. wrote: > > And about chopping off the .txt extension: > >>Darren Wyn Rees adviced: > >>for f in * >>do >>FNEW=`echo $f | sed -e 's/\.txt$//'` >> mv $f $FNEW >>done > > This one looks more mysterious than previous suggestions > ( like for example: do mv $f ${f%%.txt} done ) > but works just fine, all of the same :) Thanks Darren! > > I think I better go and look at sed's man-page once more.. Actually, there's an easier way: for f in * do mv $f `basename $f .txt` done man basename for more info. -- Conrad Sabatier http://members.home.net/conrads/ ICQ# 1147270 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message