I have doing tons of research and can't seem to figure it out.
I am using sed and trying to process a file of paths
/path/to/somewhere/for-something.rar
I need to remove everything past the last / but not the / itself. Can anyone help me with this? I can never handle sed lol
dirname
command do. Can you try this one?dirname
do. But to be sure, could you provide examples of input and output?