Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Aug 2009 11:00:40 -0400
From:      Glen Barber <glen.j.barber@gmail.com>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        Jay Hall <jhall@socket.net>, freebsd-questions@freebsd.org
Subject:   Re: find question
Message-ID:  <4ad871310908050800l1158452xb5949f2a1beee47a@mail.gmail.com>
In-Reply-To: <4A79367F.8000003@infracaninophile.co.uk>
References:  <42D44C8E-1E22-426C-A9AA-0FBF2A52188A@socket.net> <4A79367F.8000003@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 5, 2009 at 3:36 AM, Matthew
Seaman<m.seaman@infracaninophile.co.uk> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ad871310908050800l1158452xb5949f2a1beee47a>