I am trying to get the directory name of this file, which is not located in my current directory:
/home/me/PhD/file.tsv
when I run:
dirname /home/me/PhD/file.tsv
I get:
/home/me/PhD/
But, I would like to obtain just: PhD
How can I do this?
dirname file.tsv
I get.
and when I rundirname /home/me/PhD/file.tsv
I get/home/me/PhD/