If you redirect stdin (that’s what the pipe does), then there isn’t much point in starting up the REPL, as it would also read from stdin, which is closed by this point.
However, you can run a script and then keep julia running, as follows:
$ julia --banner=no -ie 'println("my initial command which I would like to show up")'
my initial command which I would like to show up
julia>
Note the -i switch, which forces Julia REPL into interactive mode.
Thank you very much. That is almost like I wished for - the julia command is not shown inside the REPL. But this should work indeed. Thank you so much!
True, you have to work a bit harder for a local echo effect. E.g.,
$ julia --banner=no -ie 'macro echo(cmd) :(println("julia> ", $(QuoteNode(cmd))); $cmd; println()) end' -e '@echo println("my initial command which I would like to show up")'
julia> println("my initial command which I would like to show up")
my initial command which I would like to show up
julia>