Skip to content

Instantly share code, notes, and snippets.

@dk8996
dk8996 / redis-delete.sh
Last active October 10, 2024 21:09
Atomically delete keys matching a pattern in Redis
###################################################################
#Script Name : redis-delete
#Description : Given a host, port and pattern to delete from Redis. Example ./redis-delete.sh redis-XXXX.XXXX.com 6379 stage:*
#Args : <host> <port> <pattern>
#Author : Dimitry Kudryavtsev
#Email : [email protected]
###################################################################
if [ $# -ne 3 ]
then