iex command line one-liner?

201 views
Skip to first unread message

Drew Gulino

unread,
Dec 16, 2014, 5:26:22 PM12/16/14
to elixir-l...@googlegroups.com
iex -e "IO.puts('hello')" opens a shell after it executes:

Erlang/OTP 17 [erts-6.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

hello
Interactive Elixir (1.0.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>


Any way to run a one-liner from the command line without it opening a shell afterwards?  Just curious, but I sometimes use other languages this way, so could be useful.

Adam Kittelson

unread,
Dec 16, 2014, 5:27:12 PM12/16/14
to elixir-l...@googlegroups.com
elixir -e "IO.puts('hello')"

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Drew Gulino

unread,
Dec 25, 2014, 10:18:02 AM12/25/14
to elixir-l...@googlegroups.com

Duh!  Thanks!

You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-talk/P9vh-dJzGzo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-ta...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages