[erlang-questions] [HOWTO] For newbies: print any term without ellipsis in shell using rp()

Edwin Fine erlang-questions_efine@REDACTED
Fri Aug 29 05:23:20 CEST 2008

I just stumbled across this and found it so useful that I thought other
Erlang newbies might, too. This info is in fact in the erlang-questions
archives, but quite rare (< 10 results that I could find).

I've always used io:format("~p\n", [X]) to print X in the shell when X is a
largish term that the shell truncates. Using io:format for this is a pain in
the rear, especially for lazy typists like me.

> mnesia:start(), X = mnesia:system_info(all).
++++ .... rows deleted for brevity ...
* {schema_version,...},
 {...}|...] %% Arghhh!!!!
Instead of using io:format, one can use the shell record print command (rp).
It works for any term and requires minimal typing.

++++ .... rows deleted for brevity ...
* {schema_version,{2,0}},*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080828/ac2e669d/attachment.htm>

More information about the erlang-questions mailing list