Using: Ubuntu 20.04.1 LTS Editor: Nano
I am working on a small shell script for college and it needs to have menu with a range of options available to the user. One of the options is to "add a directory to the manual path based on user input". I thought I had the correct answer based on materials given to me but it isn't working?
the current location of manpath is "/usr/bin/manpath"
This is my code so far:
two() {
read -p"Please enter a directory to be added to the MANPATH: " dir
manpath=/usr/share/man$dir:$manpath; export manpath
#TO SHOW IT HAS WORKED
which manpath
}
Any help would be greatly appreciated.
manfinds pages, not where the command itself is supposed to be. does that help at all?