I would like to pass an argument to an Emacs lisp function on the command line. I tried
emacs --no-splash --eval '(setq my-test-var "hello")' -l init.el t.txt
where init.el
is
(message my-test-var)
but no message is shown. I am using Emacs version 24.3 on Ubuntu 14.04.