3 Clarify directory depth
source | link

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/cd/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/c;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.

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/c/e/f
...

I want to get only /a/b and /a/c; that is, I want to exclude lines that have a subset of another line before it.

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.

2 edited tags
| link
1
source | link

Removing supersets of strings from text file

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/c/e/f
...

I want to get only /a/b and /a/c; that is, I want to exclude lines that have a subset of another line before it.