I would like the variable to have my bash shell available, similar to pwd , but equal to the section of the current working directory, and not the whole path.
i.e.,
$PWD=/a/b/c/d/e/f $PATH_SECT=c/d/e
I have a prompt that already displays this path, but I would like to update the variable in the environment to this value every time I change the directory.
How can i do this?
source share