From owner-freebsd-questions Sat Aug 10 9:39:55 2002 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 97C9B37B400 for ; Sat, 10 Aug 2002 09:39:52 -0700 (PDT) Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DE4943E72 for ; Sat, 10 Aug 2002 09:39:52 -0700 (PDT) (envelope-from parv@pair.com) Received: from sdn-ar-003dcwashp252.dialsprint.net ([206.133.15.142] helo=moo.holy.cow) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17dZHG-00015H-00; Sat, 10 Aug 2002 09:39:46 -0700 Received: by moo.holy.cow (Postfix, from userid 1001) id AE14D50BA1; Sat, 10 Aug 2002 12:42:25 -0400 (EDT) Date: Sat, 10 Aug 2002 12:42:25 -0400 From: parv To: rene@xs4all.nl Cc: questions@freebsd.org Subject: Re: /bin/sh "for" giving filenames with space as multiple parts :-(( Message-ID: <20020810164225.GA6545@moo.holy.cow> Mail-Followup-To: rene@xs4all.nl, questions@freebsd.org References: <20020810141627.GE76272@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020810141627.GE76272@xs4all.nl> 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 <20020810141627.GE76272@xs4all.nl>, wrote rene@xs4all.nl thusly... > > if [ -d $x ] use double quotes... if [ -d "$x" ] > if [ `ls $y | wc -w` == 0 ] if [ $( ls "$y" | wc -w ) == 0 ] ...or as you hinted yourself, play w/ IFS. -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message