I have a file list in a text file. How can I get only folder names from this text file ? (folders with the same name will be written once)
/lib/i386-linux-gnu/libwrap.so.0.7.6
/lib/i386-linux-gnu/libbsd.so.0
/lib/i386-linux-gnu/libdbus-1.so.3.19.4
/lib/i386-linux-gnu/libexpat.so.1.6.7
/usr/bin/rakconvert
/usr/bin/python-config
/usr/bin/winecpp
/usr/bin/wine
/usr/bin/regedit
/usr/bin/pycompile
/usr/bin/msiexec
The content of this 1.txt file. If the output I want:
/lib/i386-linux-gnu/
/usr/bin
All the searches I've done are about sending the file list to a file. "cat, dirname", etc. I didn't add them here because I used a lot of code.
Sorry for the lack of my question. Thanks