我正在为一个程序编写安装脚本,该程序需要 lsusb 的设备 ID 在其配置中,所以我正在考虑执行以下操作:
$usblist=(lsusb)
#put the list into a array for each line.
#use the array to give the user a selection list usinging whiptail.
#from that line strip out the device id and vender id from the selected line.
抱歉,我的代码还没有走得太远,但我坚持这一点,不知道如何做我想做的事。请有人帮忙。我对 shell 脚本很陌生