Commit b0e4d15c authored by 白秀江's avatar 白秀江

更新redis_scan.sh

parent c781f3c0
function delSet() function delSet()
{ {
key=$3 key=$3
rs=`redis-cli -p $1 -a $2 exists $key` rs=`redis-cli -h $1 -p $2 exists $key`
scannum=100 scannum=100
#echo $rs #echo $rs
if [ `echo $rs | awk -v tem="0" '{print($1>tem)? "1":"0"}'` -eq "0" ] ; then if [ `echo $rs | awk -v tem="0" '{print($1>tem)? "1":"0"}'` -eq "0" ] ; then
...@@ -37,5 +37,5 @@ function delSet() ...@@ -37,5 +37,5 @@ function delSet()
key="setkey" key="setkey"
echo "start remove the key $key" echo "start remove the key $key"
delSet $1 $2 $key delSet $1 $2 $key
rs=`redis-cli -p $1 -a $2 del $key` rs=`redis-cli -h $1 -p $2 del $key`
echo "remove the key $key successfully" echo "remove the key $key successfully"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment