How to pass command to iex from bash shell?

,

Hi All,
How can I pass command to iex from bash shell?
I would like to restart Elixir application in bash script, without login to iex shell.
I have tried

iex --remsh a1@host --sname a2 --eval ":init.restart"

and

iex --remsh a1@host --sname a2 <<<  ":init.restart"

but neither them work ;/

I’ve done it by

iex --sname a2  <<< ":rpc.call(:a1@host, :init, :restart, [])"

:slight_smile: