From owner-freebsd-questions@FreeBSD.ORG Wed Aug 5 15:00:41 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D978E106566C for ; Wed, 5 Aug 2009 15:00:41 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: from mail-bw0-f206.google.com (mail-bw0-f206.google.com [209.85.218.206]) by mx1.freebsd.org (Postfix) with ESMTP id 62FB38FC1A for ; Wed, 5 Aug 2009 15:00:41 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: by bwz2 with SMTP id 2so132650bwz.43 for ; Wed, 05 Aug 2009 08:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=b349lZYDTHD4K98ByKJy6mWfqEb+JVT06A/HK2S/XnQ=; b=cXDmTBk3ZG5WwW9lTymJExMhSXQtiPKrerDYRpXvQRmtKNo/i6wO7kElvLhswf5LPI bExzbfylYqZrSiHCOAl5wHoCbeIXZyMuK6c6cEro9atPehhox1DKsMjYxAWnQ5ezcg/n NTf7Ey7XKedrbfG818670nyl3v4GjTYc9EBn8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=RH+hWLFoPMs3QX8wHmnbzCizP0rRrrA5x/Sqm7HkAI5NG37ryaQt+893SegtUDxjeo ePswqXHQ1cLNsW9AZOc+Sp+k79ViGBwtEtIAB+o/0+APwT2Gu8+UDox6G1nU4Hj/joLQ CWo9Ipnj/GPG+s7iikEsqRfyafX4S0zQkbxLQ= MIME-Version: 1.0 Received: by 10.223.123.210 with SMTP id q18mr3646253far.60.1249484440207; Wed, 05 Aug 2009 08:00:40 -0700 (PDT) In-Reply-To: <4A79367F.8000003@infracaninophile.co.uk> References: <42D44C8E-1E22-426C-A9AA-0FBF2A52188A@socket.net> <4A79367F.8000003@infracaninophile.co.uk> Date: Wed, 5 Aug 2009 11:00:40 -0400 Message-ID: <4ad871310908050800l1158452xb5949f2a1beee47a@mail.gmail.com> From: Glen Barber To: Matthew Seaman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Jay Hall , freebsd-questions@freebsd.org Subject: Re: find question 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: Wed, 05 Aug 2009 15:00:42 -0000 On Wed, Aug 5, 2009 at 3:36 AM, Matthew Seaman wrote: > > Try this as: > > =A0 =A0for line in $( cat $FILELIST ) ; do > =A0 =A0 =A0 =A0echo $line > =A0 =A0 =A0 =A0find $line -type f >> $TMPFILE > =A0 =A0done > > *assuming that none of the directory names in $FILELIST contain spaces* > for line in $( cat $FILELIST | sed -e 's/\ //g') ; do echo $line find $line -type f >> $TMPFILE done This *should* fix any directories containing spaces. --=20 Glen Barber