I'm new to shell scripting and can't for the life of me figure out why this isn't working.
I'm trying to change the prompt from inside my shell script. It works when I type it into the terminal, but does nothing when I run the script and choose it from the menu. Here's what I have:
read input
case $input in
1) oldprompt=$PS1
export PS1="\d \t"
;;
2) echo "option 2"
;;
*) echo "option 3"
;;
esac