11.1Schristos#!/bin/sh
21.1Schristos#
31.1Schristos# $NetBSD: special_hosts,v 1.1 2018/01/09 03:31:14 christos Exp $
41.1Schristos#
51.1Schristos
61.1Schristosif [ $# -eq 0 ]; then
71.1Schristos	out=$(getent hosts)
81.1Schristos	[ $? -eq 0 ] || exit 1
91.1Schristos	echo "$out" | awk '{ print $2 }' | sort -u
101.1Schristos	exit 0
111.1Schristosfi
121.1Schristos
131.1Schristosout=$(showmount -E "$1")
141.1Schristos[ $? -eq 0 ] || exit 1
151.1Schristosecho "$out" | awk -v host="$1" \
161.1Schristos    '{ printf "\"%s\"\t\"%s:%s\" ", $0, host, $0 } END { printf "\n" }'
171.1Schristos
18