about summary refs log blame commit diff stats
path: root/laconia
blob: e19ba8ab6a1e47c71cc67184fadcf74fc4cbb93f (plain) (tree)





















                                                                 
                                                  

                  
#!/bin/sh

PROGNAME=${0##*/}
VERSION="0.0.1"
URI=$( echo $1 | sed -e 's/spartan:\/\///'  )

error_exit() {
	printf "%s: %s\n" "$PROGNAME" "${1:-"Unknown Error"}" >&2
	exit 1
}

usage() {
	printf "usage: %s [OPTIONS] URL [ARGS]\n" "$PROGNAME"
	printf "Simple client for spartan protocol\n"
}

case $1 in
	-h | --help)
		usage; exit ;;
	-* | --*)
		usage; error_exit "unknown option $1" ;;
	*)
		printf "$1 / 0\r\n" | nc $1 300 -4
		;;
esac