0
$\begingroup$

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?

$\endgroup$
  • 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 Olsen Jun 17 '16 at 14:22
0
$\begingroup$

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).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.