From owner-freebsd-questions@FreeBSD.ORG Fri Oct 14 19:44:05 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 00ACF16A41F for ; Fri, 14 Oct 2005 19:44:05 +0000 (GMT) (envelope-from mark.r.cullen@gmail.com) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BFE243D45 for ; Fri, 14 Oct 2005 19:44:02 +0000 (GMT) (envelope-from mark.r.cullen@gmail.com) Received: by qproxy.gmail.com with SMTP id a39so352370qbd for ; Fri, 14 Oct 2005 12:44:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=myR5d9+4DsEhUCvIOlF8nGPsHptIvuus5GC+dBvhJ4cgmzU4iiS1yC1QpFKCBBbYpA7ipQ36ImxqArQTekf7gsXhjR+n7gMx9eG+6ixibmbinvtjBrqn164G9Su44NE4+IAjD89zDHWGWhFAmCAiFwoK8zpgo2KHO/FTVBMLXhs= Received: by 10.65.159.17 with SMTP id l17mr44547qbo; Fri, 14 Oct 2005 12:44:00 -0700 (PDT) Received: from ?10.0.0.251? ( [88.96.18.86]) by mx.gmail.com with ESMTP id f16sm6578648qba.2005.10.14.12.43.56; Fri, 14 Oct 2005 12:43:57 -0700 (PDT) Message-ID: <43500AB1.5050907@gmail.com> Date: Fri, 14 Oct 2005 20:44:49 +0100 From: Mark Cullen User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Drew Tomlinson References: <435007F3.8000106@mykitchentable.net> In-Reply-To: <435007F3.8000106@mykitchentable.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Re: Help With 'for' Loop X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2005 19:44:05 -0000 Drew Tomlinson wrote: > Sorry to be such a pest today. I'm working on a sh script that uses a > for loop. To test, I've written the following: > > for i in `/usr/bin/find /multimedia/Pictures -iname "*.jpg" -or -iname > "*.gif" -print` > do > echo -e "\n$i" > done > > The first line 'find' returns is "/multimedia/Pictures/1998 > Christmas/April01.JPG" > > Yet 'echo $i' only returns "/multimedia/Pictures/1998", stopping at the > first space. Is it possible to get 'i' to represent the whole string > that 'find' returns? If so, how? > > Thanks, > > Drew > Actually, ignore that one. Wouldn't work like I thought it would :-(