Search code examples
spring-cloud-dataflow

How to redirect input to the Shell?


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.


Solution

  • 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"