Skip to content

Instantly share code, notes, and snippets.

@thiagozs
Created March 27, 2015 15:41
Show Gist options
  • Save thiagozs/b9221251c06aee6432cb to your computer and use it in GitHub Desktop.
Save thiagozs/b9221251c06aee6432cb to your computer and use it in GitHub Desktop.
Simple shell Expire Time for Redis
#!/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