1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 21:26:44 +02:00
Files
cheat.sh/share/scripts/remove-from-cache.sh
2020-06-15 18:49:14 +00:00

21 lines
255 B
Bash
Executable File

#!/usr/bin/env bash
remove_by_name()
{
local query; query="$1"
local q
redis-cli KEYS "$query" | while read -r q; do
redis-cli DEL "$q"
done
}
if [ -z "$1" ]; then
echo Usage:
echo
echo " $0 QUERY"
exit 1
fi
remove_by_name "$1"