Pattern extraction and usage by shell script

view story

http://www.unix.com – Suppose im in a directory A. which has sub-directories x/y/z m/n/p etc. Iam only considered with those which have a file netl.oa at the lowermost level. So i used the find command which gives me a list in the form Code: ./abc/def/ghi/jkl/netl.oa and so on Now i want the names abc def jkl and ghi. My script should goto abc directory and execute a file by giving command dbDump which executes the file dbDump.tdb. Now the contents of dbDump.tdb should be like this (Content of dbDump.tdb file) Code: Cellview name 'def' 'ghi' 'jkl' End Cellview How do i 1.extract def ghi jki from list 2 (HowTos)