Is there any way to redirect stdin/stdout for the sbt run task? I can do it from the Bash shell like this:
sbt run < myfile.txt
But not from the sbt console. This doesn’t work, for instance:
> run < myfile.txt
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can write a custom
runWithInputtask which does this for you by running a new JVM process with the input redirected from an argument file.See https://github.com/harrah/xsbt/wiki/Process and https://github.com/harrah/xsbt/wiki/Getting-Started-Custom-Settings.