Skip to content

Instantly share code, notes, and snippets.

@khahux
Last active November 14, 2019 09:13
Show Gist options
  • Save khahux/5a0a92ab88b98bcbac7127c940cd08d1 to your computer and use it in GitHub Desktop.
Save khahux/5a0a92ab88b98bcbac7127c940cd08d1 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
if [ $# != 2 ]; then
echo "please input ip and port, example: sh redis.sh 127.0.0.1 6379"
exit 1
fi
redis-cli -h $1 -p $2 --scan --pattern "*:[0-9]*[0-9]" | grep -v '^chouti:links:[0-9]\+$' | tee error.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment