cat <<EOF >/etc/profile.d/ip.sh if [[ `tty | grep "pts"` ]]; then export PS1='['"\u@\033[37m`env| grep SSH_CONNECTION | awk '{print $(NF-1)}'`\033[0m"' \w]\$ ' else export PS1='[\u@\h \w]\$' fi EOF
cat <<EOF >/etc/profile.d/ip.sh if [[ `tty | grep "pts"` ]]; then export PS1='['"\u@\033[37m`env| grep SSH_CONNECTION | awk '{print $(NF-1)}'`\033[0m"' \w]\$ ' else export PS1='[\u@\h \w]\$' fi EOF