HEX
Server: Apache/2.4.41 (FreeBSD) OpenSSL/1.0.2s mod_fcgid/2.3.9
System: FreeBSD salazo 12.0-RELEASE-p1303-ZFS hostBSD 12.0-RELEASE-p1303-ZFS DMR amd64
User: admin (1000)
PHP: 7.4.3
Disabled: NONE
Upload Files
File: //etc/autofs/special_hosts
#!/bin/sh
#
# $FreeBSD: releng/10.3/etc/autofs/special_hosts 270096 2014-08-17 09:44:42Z trasz $
#

if [ $# -eq 0 ]; then
	out=`getent hosts`
	[ $? -eq 0 ] || exit 1
	echo "$out" | awk '{ print $2 }' | sort -u
	exit 0
fi

out=`showmount -e "$1"`
[ $? -eq 0 ] || exit 1
echo "$out" | awk -v host="$1" \
    'NR > 1 { printf "%s\t%s:%s ", $1, host, $1 } END { printf "\n" }'