Re: libwww-perl: hostname.pl problem
Fred Donck (ksfdo0@ksepl.shell.nl)
12 Sep 1995 15:15:35 +0000
On Sep 12, 11:13am, Nick.Ing-Simmons@tiuk.ti.com wrote:
> Subject: Re: libwww-perl: hostname.pl problem
> In <199509120914.LAA02544@bergen.oslonett.no>
> On Tue, 12 Sep 1995 11:14:28 +0200
> Gisle Aas <aas@oslonett.no> writes:
> >> uname -n is more portable that hostname:
> >>
> >> chop($host = `uname -n`); # The preferred SYSV/POSIX method
Wouldn't "chop($host = `hostname | cut -f1 -d.`); " solve your problem ??
ksfdo0@kseu07 > hostname
kseu07.ksepl.shell.nl
ksfdo0@kseu07 > hostname | cut -f1 -d.
ksfdo0
ksfdo0@kseu07 >
> >
> >On my system (which is SunOS 4.1.4):
> >
> >$ uname -n
> >bergen.os
> >$ hostname
> >bergen.oslonett.no
> >
> >It seems like uname gives the wrong answer because it truncates the name to
9
> >characters.
> >
> Point taken. Begining to sound like the Sys::Domain discussion.
> It would be fine if hostname was 'bergen' and domain came from elsewhere,
> If only there was a standard...
>
>
>-- End of excerpt from Nick.Ing-Simmons@tiuk.ti.com
--
With kind regards / Met vriendelijke groeten
``` DISCLAIMER: My view is not necessarilly that of
(o o) Shell Research or any of the Shell Group of companies !!
--oOO--(_)--OOo------------------------------------------------------------
``` '''
Fred Donck Distributed Systems Engineer
__ __ __ Shell Research
/_ /_/ /_/ __/ Rijswijk, The Netherlands
/ / \ /_ /_/ Tel. +31 (0) 70 3112374
Fax. +31 (0) 70 3113110
X.400 : S=DONCK/I=FCW/C=NL/A=400NET/P=SHELL/ e-mail :
O=KSEPL RIJSWIJK/OU=RA14/OU=OPENMAIL ksfdo0@ksepl.shell.nl