Hello all,
I am working on setting up a script to set certain things and install them on new installs of linux, however I am running into an issue with appending code onto the end of my .bashrc.
I am trying to append
Code:
PS1='\033[1;32m[\A \u@\h \W]\033[0m$ '
into .bashrc and I have tried the following methods without success
Code:
echo PS1='\[\e[1;31m\][\A \u@\h \W]\$\[\e[0m\] ' >> /root/.bashrc
echo 'PS1='\[\e[1;31m\][\A \u@\h \W]\$\[\e[0m\] '' >> /root/.bashrc
echo 'PS1=\'\[\e[1;31m\][\A \u@\h \W]\$\[\e[0m\] \'' >> /root/.bashrc
echo "PS1='\[\e[1;31m\][\A \u@\h \W]\$\[\e[0m\] '" >> /root/.bashrc
as well as several others with not avail. the issue is that echo is interpreting the single quotes that I would like printed. I have tried escaping them with not luck. any ideas?