I execute a command in a script, for example svn. Sometimes, to continue the work of a team, it is required to agree with something, i.e. some time after launch, answer yes. How to achieve this in the script?
2 answers
try to add before calling svn ... call yes and pipe ( pipe ) | so that the line looks like this:
yes | svn ... this is if the "consent symbol" should be y . if there should be some other line, specify it with a parameter for the yes program.
For example, if svn requires a Y character, then the string should look like this:
yes Y | svn ... and if the word is yesss , then so:
yes yesss | svn ... |
There is a utility yes . By redirecting its output it is just possible to achieve such a result.
|
svnhas a key--non-interactive- VladD