[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting hostname

[Matt Zimmerman]
>> a) Can I get the hostname in my shell script another way (this could be a
>> question for this list)?
> getent hosts foo.bar.baz

getent is available on Linux and Solaris (7 and 8).

It is not available on Tru64 Unix 5.2, Irix 6.5.15, Mac OS X 10.2,
HP-UX (11.00 and 11.22) and AIX (5.1).

Reply to: