I have the following file:
export TMOUT
PS1="$(hostname):${LOGNAME}:\${PWD} ${PROMPT} "
PS1="${FGOLD}$(hostname):${LOGNAME}:\${PWD} ${PROMPT} ${NORMAL}"
PS1=abd
PS1="$(hostname):$LOGNAME:\$PWD $PROMPT "
export PS1 LANG
I need to add the line below under the line matching export TMOUT
:
FGOLD=`echo "\033[1;32m"`
So, the final output should look like this:
export TMOUT
FGOLD=`echo "\033[1;32m"`
PS1="$(hostname):${LOGNAME}:\${PWD} ${PROMPT} "
PS1="${FGOLD}$(hostname):${LOGNAME}:\${PWD} ${PROMPT} ${NORMAL}"
PS1=abd
PS1="$(hostname):$LOGNAME:\$PWD $PROMPT "
export PS1 LANG
The command below is not working:
sed 's/.*export.*\TMOUT./&\FGOLD=`echo "\033[1;32m"`/' pro
outputs:
export TMOUT
PS1="$(hostname):${LOGNAME}:\${PWD} ${PROMPT} "
PS1="${FGOLD}$(hostname):${LOGNAME}:\${PWD} ${PROMPT} ${NORMAL}"
PS1=abd
PS1="$(hostname):$LOGNAME:\$PWD $PROMPT "
export PS1 LANG