bash - Skip "Press any key to continue" GitBash -


i'm running function in gitbash similar below:

myfunction(){   build   runscript   launch } 

the runscript function takes few minutes run, , @ end requires input continue (the "press key continue" message). i'd able skip that, or automatically have input function continue next step.

however, can't edit script remove pause.

i tried using following:

yes "" | runscript 

but passed in input script ran. there way once script goes "press key" state?


the runscript function is:

runscript(){   cmd "/c jboss.bat" } 

and contents of jboss.bat are:

@echo off  set jboss_home=%~p1 start standalone.bat --debug 8787 --properties=jboss.properties  timeout 40  jboss-cli.bat --file=deploy-script.cli  pause; 

i don't think script should matter - it's pause @ end i'd around, without having edit file.

you should able use expect that:

#!/usr/bin/expect  spawn "./your_script.sh"  expect "press key continue" { send "\r" }  interact 

Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -