<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>The application environment variables are a bit special, as they are not primarily intended to be set from the command line. They are normally defined either in the .app file or in the sys.config file.</div><div><br></div><div>The other command-line options, e.g. -pa and -pz, are more unix-like. :)</div><div><br></div><div>BR,</div><div>Ulf W</div><br><div><div>On 24 Apr 2011, at 19:22, Daniel Dormont wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">As a relative newbie to Erlang but experienced Unix user, this was confusing to me at first. I'm very familiar with Unix shell escapes. What was surprising to me when I started working with Erlang was that command line options to Erlang modules require full-fledged Erlang terms: so if you want a string literal, such as in this case, the argument itself needs to include double quotes.<br>
<br>Dan<br><br><div class="gmail_quote">On Sun, Apr 24, 2011 at 8:00 AM, Ulf Wiger <span dir="ltr"><<a href="mailto:ulf.wiger@erlang-solutions.com">ulf.wiger@erlang-solutions.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
The issue is with quoting in the unix shell. Try:<br>
<br>
erl -mnesia dir \"/home/myname/tmp/schemas\"<br>
<br>
The reason why it worked with a single directory name was that it parsed as a valid atom, and the file module allows atoms as file names.<br>
<br>
That is, for any environment variables given as -App Key Value on the command line, Value will be parsed as an Erlang term. Anything with special meaning to the command shell needs to be escaped.<br>
<br>
BR,<br>
Ulf W<br>
<div><div></div><div class="h5"><br>
On 24 Apr 2011, at 13:04, Barco You wrote:<br>
<br>
> When I tried to indicate Mnesia schema directory with command: erl -mnesia dir "/home/myname/tmp/schemas", I got error while calling "mnesia:create_schema([node()|nodes()])" in erlang shell.<br>
><br>
> But if I start erlang shell with just a string as the schema directory name such as " erl -mnesa dir location", I could correctly create schema in erlang shell.<br>
><br>
> Seemingly Mnesia schema directory can not be indicated as a full path.<br>
><br>
> {erts, "5.8"},<br>
> {kernel,"2.14"},<br>
> {stdlib,"1.17"}.<br>
><br>
><br>
> Best regards,<br>
> Barco<br>
</div></div>> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
Ulf Wiger, CTO, Erlang Solutions, Ltd.<br>
<a href="http://erlang-solutions.com/" target="_blank">http://erlang-solutions.com</a><br>
<br>
<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>Ulf Wiger, CTO, Erlang Solutions, Ltd.</div><div><a href="http://erlang-solutions.com">http://erlang-solutions.com</a></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>