Skip to content

Instantly share code, notes, and snippets.

#!/usr/lib64/riak/erts-5.8.4/bin/escript
%% -*- erlang -*-
%%! -smp enable -sname convert_binary_ring -mnesia debug verbose
main([RingFile, OutFile]) ->
try
{ok, Binary} = file:read_file(RingFile),
Ring = binary_to_term(Binary),
try
file:write_file(OutFile, io_lib:format("~p.~n", [Ring])),