そのため、構成で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.
行は次のとおりです。
Bus 001 Device 004: ID 0665:5161 Cypress Semiconductor USB to Serial
そのため、「ID{space}」の後には9文字しか必要ありません。
ベストアンサー1
私が見る最初のエラーは次のとおりです。あなたが書いた$usblist=(lsusb | awk '{print $6}')
$
最初から削除して$
前に追加する必要があります(
。一部の引用も役に立ちます。つまり
usblist="$(lsusb | awk '{print $6}')"