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> > > I do want the directories-- as a prefix on the filename. I don't need them by themselves. Sorry if I wasn't clear. This operation is for a process that requires a complete filename up to the root, and it eats files. But you've given me what I need and so I'm getting things done (but doing it today 'cause I couldn't get anything done yesterday.)
-- Bill Thoen GISnet - www.gisnet.com 1401 Walnut St., Suite C Boulder, CO 80302 303-786-9961 tel 303-443-4856 fax _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
