remoteip=$(curl -s ifconfig.me) if [[ -z $remoteip ]]; then remoteip=localhost; fi export PROMPT_COMMAND='RETRN_VAL=$?; logger -p local6.debug "$(whoami) $remoteip [$$] [$RETRN_VAL] [$PWD]: $(history 1 | sed "s/^[ \t]*[0-9]\+[ \t]*//")"'