cd `dirname `which prog``
I'm trying to remember how to use the output of a nested Bash builtin call.
So `which prog` gives me the path to the program, i'm interested in.
Then I would like to get the directory path leading to that program and plug it into 'cd', so i end up in the directory containing the program.
What am I missing?
thanks for any hints.