Skip to content

Instantly share code, notes, and snippets.

View NathanBaulch's full-sized avatar

Nathan Baulch NathanBaulch

  • Melbourne, Australia
View GitHub Profile
@NathanBaulch
NathanBaulch / redis-scan.sh
Last active March 13, 2018 05:24 — forked from obscurerichard/redis-scan.sh
A bash script that scans Redis keys by pattern using SCAN
#!/bin/bash
if [ "$#" -lt 1 ]
then
echo "Scan keys in Redis matching a pattern using SCAN (safe version of KEYS)"
echo "Usage: $0 <host> [port] [database] [pattern]"
exit 1
fi
host=${1:-}
port=${2:-6379}