From owner-freebsd-questions Thu Jan 9 8:50:42 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 9EFCF37B401 for ; Thu, 9 Jan 2003 08:50:41 -0800 (PST) Received: from hotmail.com (oe24.pav2.hotmail.com [64.4.36.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BB3F43F1E for ; Thu, 9 Jan 2003 08:50:41 -0800 (PST) (envelope-from unixtools@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 9 Jan 2003 08:50:41 -0800 X-Originating-IP: [202.63.172.104] From: "Unix Tools" To: "BigBrother (BigB3)" , "Gary W. Swearingen" Cc: References: <20030108175539.W65616@bigb3server.bbcluster.gr> Subject: Re: Renaming files with spaces in the name to files without spaces.. Date: Wed, 8 Jan 2003 16:06:36 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Message-ID: X-OriginalArrivalTime: 09 Jan 2003 16:50:41.0130 (UTC) FILETIME=[3E675CA0:01C2B7FF] 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 Conider the file "freebsd help.doc" mv freebsd\ help.doc freebsdhelp.doc ----- Original Message ----- From: "Gary W. Swearingen" To: "BigBrother (BigB3)" Cc: Sent: Wednesday, January 08, 2003 10:05 PM Subject: Re: Renaming files with spaces in the name to files without spaces.. > Paste this into your shell: > > XXX="RESULTS OF JAN 01 2002.txt " > YYY=${XXX%% } > ZZZ=$(echo ${YYY} | tr ' ' '_') > > for III in "$XXX" "$YYY" "$ZZZ"; do > echo "'$III'" > done > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message