in reply to Re: automatically giving user input to a command line
in thread automatically giving user input to a command line
I should clarify, I am not looking for a timeout, as the program halts until an actual user enters something into the command window during execution. I am looking for the script to issue what a physical person needs to do when it prompts with the screen
"Do you want to read the file? 1 for yes, 2 for no. (Default is 2)"
in this case, if someone was physically at the computer during execution and they wanted to read the file, they would type "1" and hit enter. That is what I am looking to have my script do automatically. I looked into expect, and their are two primary issues with it unfortunately.
One is it appears to depend on using files and I am not using any files, perhaps I am incorrect on this?
Two, I am developing this for a company where I can't put this on our systems without waiting past a time where the deadline for the larger piece of code that this script is associated with.
Edit: I have decided to retrieve Expect for my local system at least and begin the process of making point two of this post moot. Hopefully Expect will be able accomplish what I need.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: automatically giving user input to a command line
by zentara (Cardinal) on Jun 13, 2012 at 20:33 UTC | |
by tfredett (Sexton) on Jun 13, 2012 at 20:50 UTC |