Michael Rasmussen wrote:
> On Sat, Nov 07, 2009 at 09:55:18AM -0700, Bill Thoen wrote:
>> Michael Rasmussen wrote:
>>> On Sat, Nov 07, 2009 at 08:53:13AM -0700, Bill Thoen wrote:
>>>
>>>> $ ls -1 BLM/* | egrep ':$|\.shp' | grep -v \.xml
>>>> (list everything under the BLM directory but include only those lines
>>>> that end in a colon (the pathname) or contain a shapefile extension (.shp))
>>>>
>>> find . -name \*\.shp -o -type d
>>> sounds like what you're looking for
>>>
>> YES! Thanks for the fast response too. This works just about the way I
>> want it. Only one more step required and that's to filter out the lines
>> that have JUST the directory in them.
>
> But you said you wanted them..."but include only those lines
> that end in a colon (the pathname)"
>
> to get just the shp files is even easier:
>
> find . -name \*\.shp
>
> or in general terms
>
> find <starting directory> -name <name regex>
Also I think this is a file system wildcarding (?) not a Perl(-ish)
regex so the \. isn't needed.
find . -name \*.shp should work just fine.
\\||/
Rod
--
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug