Last active
May 14, 2023 21:20
-
-
Save boriska70/c82314ca05492354c20e7fdc24044a0e to your computer and use it in GitHub Desktop.
Revisions
-
boriska70 revised this gist
May 14, 2023 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,9 @@ for key in $(redis-cli -h hostname.com keys "pat:tern:*"); do keys="$keys"" ""$key" done redis-cli -h hostname.com mget $(echo $keys) > values_1405 cat values_1405 | sort | uniq -c echo $keys | tr " " "\n" | wc -l echo $keys | tr " " "\n" > keys_1405 paste keys_1405 values_1405 > result_1405 -
boriska70 created this gist
May 14, 2023 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ ##### Get values by pattern and group by export keys="" for key in $(redis-cli -h hostname.com keys "pat:tern:*"); do keys="$keys"" ""$key" done redis-cli -h hostname.com mget $(echo $keys) | sort | uniq -c echo $keys | tr " " "\n" | wc -l