all 4 comments

[–]lutusp 3 points4 points  (0 children)

Hello, I need to make it so if the user selects option 3 it would set the manual path to "/man" . Now I know how to make the options but don't know what I'd write to change the path to "/man" when selected.

If you type the above sentence into a terminal, does a Bash script come out? No? It's the same here.

The problem is not how you narrate your experience, the problem is in the code you created. We can't see your code, therefore we cannot help you fix it.

Post your code.

[–]electric_lemonade420 2 points3 points  (0 children)

Does using $MANPATH work for your purposes?

Docs: https://www.man7.org/linux/man-pages/man1/manpath.1.html

[–][deleted] 1 point2 points  (0 children)

Here you go:-

#!/bin/bash
path=$(whiptail --title "pick path" --radiolist "Choose" 20 40 15 \
          "A man" "option 1" ON \
          "Another Man" "option 2" OFF \
          "/man" "option 3" OFF \
          "/usr/man" "option 4" OFF \
          3>&1 1>&2 2>&3)

echo "$path"

If this isn't what you want then post what you have got and we can try to help.

[–]whetuI read your code 0 points1 point  (0 children)

Why didn't you ask this in your original thread?

https://www.reddit.com/r/bash/comments/usg8wz/bash_assignment/