DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

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

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T q

⟦f84f06eaf⟧ TextFile

    Length: 948 (0x3b4)
    Types: TextFile
    Names: »query.sh«

Derivation

└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
    └─⟦2fafebccf⟧ »EurOpenD3/mail/smail3.1.19.tar.Z« 
        └─⟦bcd2bc73f⟧ 
            └─⟦this⟧ »samples/queryprog/query.sh« 

TextFile

#!/bin/sh
# @(#)query.sh	1.2 6/28/88 16:33:52
#
# match hosts in a shell case statement.  It is generally more
# efficient to use a paths file and a method file to perform this kind
# of routing.
#
# See the source file samples/queryprog/routers for more information
# on how this shell script is to be used as part of a complete router
# file entry.

# The hostname is passed as the first argument, write a path and
# transport for each host that we match.  Alternately, no transport is
# output if the default is sufficient.
case "$1" in

\[*)	# look for internet addresses in square brackets
	inet=`echo "$1" | sed -n 's/^\[\([0-9.]*\)\]$/[\1]/p'`
	if [ "$inet" ]; then
		echo $inet smtp
	else
		exit 1
	fi;;
foo)	echo foo uusmtp;;
bar)	echo foo!bar uusmtp;;
curds)	echo curds;;
whey)	echo curds!whey;;
*' '*|*'	'*) exit 1;;	# watch out for hostnames with whitespace
*)	echo foo!$1 uusmtp;;	# forward mail for unknown hosts to foo

esac

exit 0