ZKX's LAB

linux下shell脚本执行过程中重新输入命令 linux脚本终端输入命令

2021-03-17知识8

在Linux shell脚本中,如何实现输入yes执行一段指令,输入no则执行另外一段指令 您好!可以利用Shell函数实现bin/bashaction1(){指令}action2(){另外一个指令}read-p\"请输入您的选择:\"chooseif[$choose=\"yes\"]thenaction1fiif[$choose=\"no\"]thenaction2fi

Linux shell脚本如何自动运行程序并输入命令

linux下shell脚本执行过程中重新输入命令 linux脚本终端输入命令

Linux shell脚本如何自动运行程序并输入命令 我建议你使用shell的spawn命令,很好用的,能实现你说的功能!

#linux脚本终端输入命令

随机阅读

qrcode
访问手机版