0
我寫了一個shell腳本來安裝一個軟件。但它具有交互式控制檯。說,輸入是/否。如何捕捉sudo命令的交互式響應?
命令:sudo的./downloaded_software.run
shell腳本會的hve上面的命令(test.sh)
Response of a command:
----------------------------------------------------------------------------
Welcome to the Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.
Core Files [y/N] :
與此類似,還有要處理三個互動響應(Y ,Y並按[Enter])。我該怎麼做 ?
我沒有按照你的問題,你想創建用戶交互式安裝你的軟件?你想知道如何在Linux ubuntu上做到這一點? – LethalProgrammer
描述你的意思是「捕獲」。 –
@LethalProgrammer:在手動程序中,我可以看到這些交互式提示。我想知道如何處理它(自動/通過shell腳本)。 – Jackie