HP-UX system update terminal session title bar

Nothing huge today.

I just wanted my HP-UX systems to udpate the title bar when Linux systems or Putty terminal sessions come in.

——–begin code——

NAME=”$(uname -n):${PWD}”
LEN=`echo “$NAME\c” | wc -c`
if [ “$TERM” = “xterm” ]
then
    PROMPT_COMMAND=”\033]0;${NAME}\007″
    echo $PROMPT_COMMAND
fi
——–end code———–

Tested with Putty. Will test later today with Linux.