and excuse my english
I need to create a small menu to mount usb with Xdialog --menubox
Code: Select all
#!/bin/bash
rm -f /temp1
rm -f /temp2
blkid | cut -d":" -f1 | grep -v a | grep -v b>/temp1
IFS=$'\n'
usbArray=($(blkid | cut -d":" -f1 | grep -v a | grep -v b))
# Not work with variable
Xdialog --title "USB unit list" --menu "Please choose " 45 80 5 ""${usbArray[@]}"" 2>/temp2
# Not work with file
Xdialog --title "USB unit list" --menu "Please choose " 45 140 5 /temp1 2>/temp2
How would the code (Xdialog menubox) to work with a variable and file (two cases)?
thanks