Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of AIX Non GNU tool for text replacement without wasting too much if your time.
The question is published on by Tutorial Guruji team.
The question is published on by Tutorial Guruji team.
Contents of the file :
PS1="$(hostname):${LOGNAME}:${PWD} ${PROMPT} " PS1="${FGOLD}$(hostname):${LOGNAME}:${PWD} ${PROMPT} ${NORMAL}" PS1=abd PS1="$(hostname):$LOGNAME:$PWD $PROMPT " export PS1 LANG
Lines I want to change :
PS1="$(hostname):${LOGNAME}:${PWD} ${PROMPT} "
replacement line :
PS1="${FGOLD}$(hostname):${LOGNAME}:${PWD} ${PROMPT} ${NORMAL}"
Answer
You could use sed
:
sed 's/^PS1="$(hostname).*${PROMPT}.*/PS1="${FGOLD}$(hostname):${LOGNAME}:${PWD} ${PROMPT} ${NORMAL}"/'
We are here to answer your question about AIX Non GNU tool for text replacement - If you find the proper solution, please don't forgot to share this with your team members.