34 lines
288 B
Plaintext
34 lines
288 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
###
|
||
|
# defaults
|
||
|
###
|
||
|
|
||
|
host=127.0.0.1
|
||
|
port=6379
|
||
|
table=0
|
||
|
|
||
|
###
|
||
|
# config
|
||
|
###
|
||
|
|
||
|
if (( $# )); then
|
||
|
. "$1"
|
||
|
shift
|
||
|
fi
|
||
|
|
||
|
###
|
||
|
# library
|
||
|
###
|
||
|
|
||
|
. "${REDISH_LIB_PATH:-.}"/redi.sh
|
||
|
|
||
|
###
|
||
|
# driver
|
||
|
###
|
||
|
|
||
|
while get_cmd line; do
|
||
|
parse_cmd redis_cmd "$line"
|
||
|
redis_send "$redis_cmd"
|
||
|
done
|