I am trying to run a pbs file which runs a script on a cluster. The script prompts for a user input. I wish to write this user input in my pbs file, what is a good way to do this?
$\begingroup$
$\endgroup$
1
-
2$\begingroup$ why don't you put the arguments into a file and read them from there from your program? I'm assuming that the input isn't a game-time decision that needs to be made in person, so there really shouldn't be much of a barrier to doing this. $\endgroup$– Tyler OlsenCommented Jun 17, 2016 at 14:22
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
You might check out the concept of a "here document" assuming your shell is bash. That way you can write, in your batch (pbs, lsf, sge, slurm, or whatever) script, the text of what you'd like to respond to the prompt with, capture it in your batch script for reproducibility purposes, and format it more or less how you like (based on the constraints of the prompting program).