diff --git a/evomaintenance.sh b/evomaintenance.sh index d997ab7..0eb33b0 100755 --- a/evomaintenance.sh +++ b/evomaintenance.sh @@ -86,11 +86,11 @@ get_who() { } get_begin_date() { - echo "$(date "+%Y") $(echo $(get_who) | cut -d" " -f3,4,5)" + printf "%s %s" "$(date "+%Y")" "$(get_who | cut -d" " -f3,4,5)" } get_ip() { - ip=$(echo $(get_who) | cut -d" " -f6 | sed -e "s/^(// ; s/)$//") + ip=$(get_who | cut -d" " -f6 | sed -e "s/^(// ; s/)$//") [ -z "${ip}" ] && ip="unknown (no tty)" [ "${ip}" = ":0" ] && ip="localhost"