From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Taylor Subject: Re: Stupid spaces Date: Fri, 13 Feb 2004 08:33:33 -0800 Sender: linux-admin-owner@vger.kernel.org Message-ID: <5.2.1.1.0.20040213082821.00acdce8@mustang> References: <5.2.1.1.0.20040212130333.00b0f4a0@mustang> Mime-Version: 1.0 Return-path: In-Reply-To: References: <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 06:15 PM 02/12/2004, rich+ml@lclogic.com wrote: >How about: > > for x in *; do mv $x ${x// /_}; done That's kinda what I was thinking, only problem with that is, the file named "blah blah.p" will cause an error as bash/sh/ksh will think it is two files. mv: cannot stat `blah': No such file or directory mv: cannot stat `blah.p': No such file or directory even tried using `ls -c1` same thing. Worse thing is I know I did this before, so long ago, maybe I used Perl after all. Hmm...