(2) standalone eshell script : emacs
[https://www.reddit.com/r/emacs/comments/lssz9h/standalone_eshell_script/] - - public:mzimmerm
The only known way to run eshell script from shell (outside emacs). This starts emacs UI. Add --batch to run without UI. emacs --debug-init -q --eval “(progn (require 'em-script) (let ((eshell-rc-script \“/tmp/wtf.esh\“)) (eshell)))“