[erlang-questions] why not works command from shell
Sergey Safarov
s.safarov@REDACTED
Tue Dec 13 20:52:48 CET 2016
When executed following command from erl shell all works as expected
1> inet_res:nslookup('example.org','in','a').
{ok,{dns_rec,{dns_header,2,true,query,false,false,true,true,
false,0},
[{dns_query,"example.org",a,in}],
[{dns_rr,"example.org",a,in,0,86400,
{93,184,216,34},
undefined,[],false}],
[{dns_rr,"example.org",ns,in,0,86399,"a.iana-servers.net",
undefined,[],false},
{dns_rr,"example.org",ns,in,0,86399,"b.iana-servers.net",
undefined,[],false}],
[{dns_rr,"a.iana-servers.net",a,in,0,172799,
{199,43,135,53},
undefined,[],false},
{dns_rr,"a.iana-servers.net",aaaa,in,0,172799,
{8193,1280,143,0,0,0,0,83},
undefined,[],false},
{dns_rr,"b.iana-servers.net",a,in,0,172799,
{199,43,133,53},
undefined,[],false},
{dns_rr,"b.iana-servers.net",aaaa,in,0,172799,
{8193,1280,141,0,0,0,0,83},
undefined,[],false}]}}
But when i try executed following command from bash i got error
[root@REDACTED ~]# erl -noshell -s inet_res nslookup 'example.org' 'in' 'a'
{"init terminating in do_boot",{undef,[{inet_res,nslookup,[['example.org
',in,a]],[]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
init terminating in do_boot ()
Crash dump is being written to: erl_crash.dump...done
Why it take place?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161213/1603402f/attachment.htm>
More information about the erlang-questions
mailing list