[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-inetutils] Bug in 'hostname' version 1.9.4 (Arch linux)
From: |
Alfred M. Szmidt |
Subject: |
Re: [bug-inetutils] Bug in 'hostname' version 1.9.4 (Arch linux) |
Date: |
Fri, 29 Apr 2016 04:46:58 -0400 |
During scripting I use the command 'hostname -i' to return the ip
address of the hostname. All is good, the ip value is what I expect,
_except_ for a trailing space. I see no need for a trailing space as it
complicates the script considerably and is inconsistently with other
similar commands.
Example:
----
address@hidden ~]$ hostname -i | xxd
00000000: 3139 322e 3136 382e 322e 3133 3920 0a 192.168.2.139 .
----
(Note the '20' hex (space) prior to newline).
So, the reason for that is that "hostname -i" can output multiple IP
addresses -- and the code that does this is simplistic. But yea, the
trailing space shouldn't be there at the end.
Thanks, I'll fix it for the next release.