【redis】在shell中查询redis数据
/usr/local/bin/redis-cli -h redishost -a redispass command > /dev/null 2>&1
redishost :redis主机信息
redispass :redis密码
command :查询命令
> /dev/null 2>&1 :忽略报错
/usr/local/bin/redis-cli -h 192.168.1.21 -a AS@redis keys '*'
查询全部需要加‘’
#/usr/local/bin/redis-cli -h 192.168.1.21 -a AS@redis del "policyinfo:20+101+${number}"
/usr/local/bin/redis-cli -h 192.168.1.22 -a AS@redis keys "policyinfo:16+10*+${number}"
#/usr/local/bin/redis-cli -h 192.168.1.22 -a AS@redis del "policyinfo:16+103+${number}"
#/usr/local/bin/redis-cli -h 192.168.1.22 -a AS@redis del "policyinfo:16+105+${number}"