I have a file path.txt with the path to a file(say a txt file):
I want to extract the path i.e the string from beginning to the last occurrence of
/ (since the number of folder in path may vary).
I want to get:
Which would be the best choice: sed/awk/perl/vi and how?