From owner-freebsd-questions Wed Jan 8 9:35:20 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6926337B401 for ; Wed, 8 Jan 2003 09:35:19 -0800 (PST) Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE1E143EE1 for ; Wed, 8 Jan 2003 09:35:18 -0800 (PST) (envelope-from parv_fm@mailsent.net) Received: from sdn-ap-031dcwashp0054.dialsprint.net ([65.179.64.54] helo=moo.holy.cow) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18WK6n-0001Db-00; Wed, 08 Jan 2003 09:35:17 -0800 Received: by moo.holy.cow (Postfix, from userid 1001) id 3FACDBC67; Wed, 8 Jan 2003 12:38:09 -0500 (EST) Date: Wed, 8 Jan 2003 12:38:09 -0500 From: parv To: "BigBrother (BigB3)" Cc: freebsd-questions@freebsd.org Subject: Re: Renaming files with spaces in the name to files without spaces.. Message-ID: <20030108173809.GA64488@moo.holy.cow> Mail-Followup-To: "BigBrother (BigB3)" , freebsd-questions@freebsd.org References: <20030108175539.W65616@bigb3server.bbcluster.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030108175539.W65616@bigb3server.bbcluster.gr> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG in message <20030108175539.W65616@bigb3server.bbcluster.gr>, wrote BigBrother (BigB3) thusly... > > Sorry for this OT but I am trying for some hours to achieve > a massive rename of files using a simple script and I have not > success yet. I want to rename files like > > "RESULTS OF JAN 01 2002.txt " > > to > > "RESULTS_OF_JAN_01_2002.txt" here is another way in perl (though it changes blanks to '-'; edit as you desire)... http://www103.pair.com/parv/comp/src/perl/sanename.perl description... http://www103.pair.com/parv/comp/src/perl/sanename.perl.pod - parv -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message