Lee_Machine
April 6th, 2013, 06:58 AM
So I'm changing hostnames on my servers but I would like to have the old hostname be displayed at the BASH prompt, ie username@hostname. I've tried defining this in both the local bashrc file as well as the gobal. The same goes for the local and global bash_profile files. Any ideas?
Something like this seems to be on the right track, but I cannot get the syntax to work.
HOST= hostname
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOST%%*}" "${PWD}"'
Thanks for the help.
Something like this seems to be on the right track, but I cannot get the syntax to work.
HOST= hostname
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOST%%*}" "${PWD}"'
Thanks for the help.