Created
March 27, 2015 15:41
-
-
Save thiagozs/b9221251c06aee6432cb to your computer and use it in GitHub Desktop.
Simple shell Expire Time for Redis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOUR=3600 | |
REDISCLI=/home/zilli/redis/redis-cli | |
HOST=10.0.0.125 | |
$REDISCLI -h $HOST KEYS "$1" | | |
while read LINE; | |
do | |
echo "SET EXPIRE $LINE"; | |
echo `$REDISCLI -h $HOST expire $LINE $HOUR`; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment