Created
June 27, 2021 14:45
-
-
Save itamarhaber/5519a182b3e5a21859ed1d0d80a537bc to your computer and use it in GitHub Desktop.
Dump a Redis key in TCL binary string encoding
This file contains 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
-- DUMPs a Redis key in TCL-compatible binary string encoding | |
local b = redis.call("DUMP",KEYS[1]) | |
local s = "" | |
for i = 1, string.len(b), 1 do | |
s = s .. string.format("\\x%02X",string.byte(b,i)) | |
end | |
return s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment