From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Taylor Subject: Re: Stupid spaces Date: Fri, 13 Feb 2004 08:56:01 -0800 Sender: linux-admin-owner@vger.kernel.org Message-ID: <5.2.1.1.0.20040213085234.00b07b88@mustang> References: <5.2.1.1.0.20040212130333.00b0f4a0@mustang> <5.2.1.1.0.20040212130333.00b0f4a0@mustang> <20040213040757.GD7833@dcnet.com.ar> Mime-Version: 1.0 Return-path: In-Reply-To: <20040213040757.GD7833@dcnet.com.ar> References: <5.2.1.1.0.20040212130333.00b0f4a0@mustang> <5.2.1.1.0.20040212130333.00b0f4a0@mustang> List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit To: linux-admin@vger.kernel.org At 08:07 PM 02/12/2004, Emiliano Castagnari wrote: >El [ Thu 12, Feb 04 - 13:08 ] , Scott Taylor expreso: > > Hello all, > > > > I've done this before, but so long ago I can't find it again. I have a > > bunch of files with spaces in them and I want to rename them with the > > spaces removed. > > > > I have a rename command that came with RH7.2 but doesn't do the job > > rename 's/\ //g' * > > does nothing in bash > > > > So I wrote a script many moons ago to do this but I can't remember which > > server it was on, let alone how I did it. Something with tr and mv > > methinks. > > > > anyone? > >Here you go, my simple aproach using the virtudes of bash scripting: Interesting. Only it doesn't "remove" the spaces it simply replaces them with something else.