I have a file with a list of directories in it:
/a/b
/a/b/c
/a/b/d
/a/b/e
/a/c
/a/c/b
/a/c/d
/a/d/e
/a/d/e/f
/a/e/f/g
/a/e/f/g/h
...
I want to get only /a/b, /a/c, /a/d/e, and /a/e/f/g; that is, I want to exclude lines that have a subset of another line before it. The depth of subdirectories is arbitrary so I could go down 2, 3, 4, etc. directories to find the unique subdirectory.
/a
at the top?)/a/b
,/a/c
, etc, come from? If you already know what they are, why do you need the file at all?