#! /bin/sh # newshostname - print the hostname known to the news system # =()<. ${NEWSCONFIG-@@}>()= . ${NEWSCONFIG-/var/lib/news/bin/config} # export NEWSCTL NEWSBIN NEWSARTS PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH umask $NEWSUMASK # dd returns correct exit status, unlike cat, so we use it, despite its # baroque command syntax exec 2>/dev/null dd if=$NEWSCTL/whoami || hostname || dd if=/etc/whoami || uuname -l || uname -n || echo the_unknown_host