Replicating the issue:
$ rebar3 new release foo
===> Writing foo/apps/foo/src/foo_app.erl
===> Writing foo/apps/foo/src/foo_sup.erl
===> Writing foo/apps/foo/src/foo.app.src
===> Writing foo/rebar.config
===> Writing foo/config/sys.config
===> Writing foo/config/vm.args
===> Writing foo/.gitignore
===> Writing foo/LICENSE.md
===> Writing foo/README.md
$ cd foo
$ rebar3 release
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling foo
===> Assembling release foo-0.1.0...
===> Release successfully assembled: _build/default/rel/foo
$ _build/default/rel/foo/bin/foo daemon
$ _build/default/rel/foo/bin/foo eval "\"hello there\"."
"hello there"
$ _build/default/rel/foo/bin/foo eval "\"hello\\nthere\"."
{ok, "hello
there"}
As it can be seen, the result of executing _build/default/rel/foo/bin/foo eval "\"hello there\"." is
and the result of executing _build/default/rel/foo/bin/foo eval "\"hello\\nthere\"." is
In the second case the {ok, Result} term is not unwrapped because the following sed in the generated script does not match multiline input:
echo "$result" | sed 's/^{ok, \(.*\)}$/\1/'