Reputation: 147
In the installation of my system, it compiles a module called php ssh2, which asks to select a patch (as shown on the picture in red).
It does not need a patch, so you don't have to do anything other than just press Enter.
I just need it to press Enter to continue the build - Is there some way for me to do this in shell script / to remove this confirmation, to make press Enter automatically?
Upvotes: 1
Views: 890
Reputation: 1187
As a non elegant but working solution I have found that in some cases the only way to script the ENTER was redirecting a file with that only char on it. Similar to previous solution:
cat enter.txt | ./myprogram
To create de file just do:
vi enter.txt
<press i>
<press ENTER>
<press ESCAPE>
:wq
Upvotes: 1
Reputation: 3516
Assume your php ssh2 script is called myprogram
, then you can do this
echo -ne '\n' | ./myprogram
\n
will simulate the enter
Upvotes: 1