DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦84656486f⟧ TextFile

    Length: 1173 (0x495)
    Types: TextFile
    Notes: UNIX file
    Names: »lshost«

Derivation

└─⟦8c4f54e61⟧ Bits:30004068/disk2.imd Interactive TCP/IP v.1.2
└─⟦8c4f54e61⟧ UNIX Filesystem
    └─⟦this⟧ »hb/new/usr/admin/menu/packagemgmt/tcpipmgmt/lshost« 

TextFile

#ident	"@(#)lshost	3.1 - 88/06/01"

#ident	"@(#)lshost	1.2 - 87/07/28"
#	This shell is used to list host entries from /etc/hosts

PACKAGE="Extended Networking Utilities"
PATH=:/bin:/usr/bin:/usr/lbin
HOST=/etc/hosts
EQUIV=/etc/hosts.equiv
SMTP=/etc/hosts.smtp
XDIR=$MENUTOP/menu/packagemgmt/tcpipmgmt
cd $XDIR


FIRST=true
flags="-qq -k$$"
trap 'exit 0' 1 2  15

if [ ! -r $HOST ]; then
	echo "There are no entries in the '$HOST' file
Use hostmgmt to add entries.\n"
	exit
fi

syslist=`grep '^[^#]' $HOST  2>/dev/null | \
	sed 's/[^ 	]*[ 	]*\([^ 	]*\).*/\1/' \
	|  sort -u  |	grep '^[A-Za-z0-9]'`

if [ $? -ne 0 ]; then
	echo "There are no entries in the '$HOST' file
Use hostmgmt to add entries.\n"
	exit
fi

while $FIRST || chkyn ${flags} -f '
Do you want to see another host entry?' || break

do
FIRST=false
	echo "
This is the current list of hosts known to the $PACKAGE:"
	echo "${syslist}"  |  pr -t -w80 -4
	hostname=`chkyn ${flags} -fec '
Enter host name you want to see in detail [q]:' \
		${syslist}`
	echo "\nHere is the hosts file entry for machine '${hostname}'."
	grep "${hostname}" $HOST |
		while read a b c
		    do /bin/sh _hostprint $a $b $c
		done
done