From d05de0f9251e9e5be08d0447c60a1350701cf420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Sat, 16 Mar 2019 19:40:53 +0100 Subject: [PATCH] replace $(echo $(cmd)) by $(cmd) --- evomaintenance.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"