|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 475 (0x1db)
Types: TextFile
Names: »hostname.pl«
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen
└─⟦3da311d67⟧ »./cops/1.04/cops_104.tar.Z«
└─⟦6a2577110⟧
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen
└─⟦6a2577110⟧ »./cops/1.04/cops_104.tar«
└─⟦this⟧ »cops_104/perl/hostname.pl«
#
# file: hostname.pl
# usage: $hostname = &'hostname;
#
# purpose: get hostname -- try method until we get an answer
# or return "Amnesiac!"
#
package hostname;
sub main'hostname {
if (!defined $hostname) {
$hostname = ( -x '/bin/hostname' && `/bin/hostname` )
|| ( -x '/bin/uname' && `/bin/uname -n` )
|| ( -x '/usr/bin/uuname' && `/usr/bin/uuname -l`)
|| 'Amnesiac! '; # trailing space is for chop
chop $hostname;
}
$hostname;
}
1;