replace $(echo $(cmd)) by $(cmd)
This commit is contained in:
parent
71d1fc417c
commit
d05de0f925
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue