Initial commit
This commit is contained in:
commit
968881cc5a
|
@ -0,0 +1,25 @@
|
||||||
|
#!/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 "GET / 0\r\n" | nc $1 300 -4
|
||||||
|
;;
|
||||||
|
esac
|
Loading…
Reference in New Issue