Hey,
examples of the input (text line):
/bla/blMOasdn234.adanif24/blabla.rar
/bla/blMOasdn234.adanif24/blabla23124.bin
/bla/bla/bla/bla/bla/bla.bin
and what I need to do is extract/select only the dir path so the output would be:
/bla/blMOasdn234.adanif24/
/bla/blMOasdn234.adanif24/
/bla/bla/bla/bla/bla/
I was trying to use sed and I could only get the oposite result, like
echo /test/test2/test3/noname.rar | sed 's/\/.*\///'
result noname.rar