I am wondering why the following script won't work:
#!/bin/bash read -p 'First lets write PROMPT.SH' echo '#!/bin/bash'>prompt.sh echo "export PS1='\e[1;31m\]\u@\h \W\$\e[0m\] '">>prompt.sh read -p "Change Title and Prompt" source prompt.sh echo texttexttext read -p "Now lets tidy up PROMPT.SH" rm ./prompt.sh read -p "That was the program"
What I am trying to do is change the window title, prompt, and text color that I can normally do with,
PS1='\e[1;31m\]\u@\h \W\$\e[0m\] '
during a regular bash session but not when I add it to a script and then run the script.