I've tried java -jar shell.jar < commands.txt
but that doesn't seem to work.
One would think a shell would support redirection for use in scripts.
There's a --spring.shell.commandFile
option that's supported at the Shell app, but it is not documented - we will fix it.
With that, you could pass the commands like:
java -jar shell.jar --spring.shell.commandFile="commands.txt"