0
I have a (very large) text file of the form...
/folder1/fileA
/folder1/fileB
/folder1/fileC
...
/folder999/fileA
/folder999/fileB
/folder999/fileC
...etc
with an unknown number of entries for each folder, and the folder numbers are not necessarily successive. What I'd like to eventually extract is another list telling me the folders that are shown in this file, e.g.
folder1
folder7
folder76
...etc
but I can't seem to figure out what combination of sed, awk or general script would be able to tell me this.
If anyone has any ideas, they'd be greatly appreciated.