Skip to main content

Thread: bash dialog --checklist


if use dialog --checklist, how use output show me chosen item strings instead of tag numbers? suppose have file file.txt random content. can come with:

code:
#!/bin/bash    n=1  pkg in $(cat file.txt)               echo "$n $pkg off" >> /tmp/output.txt          n=$[n+1]  done    dialog --checklist "choose item:" 80 40 20 \  $(cat /tmp/output.txt)    #commented check on script  #rm /tmp/output.txt
now how use dialog output example echo items belong tags checked in dialog checklist? example, file.txt contains 5 lines "var1" "var2" ... "var5", how line printed says "you've chosen var2 , var3" when checked 2 , 3?

doesn't man-page 'dialog' wrt query?

not have 'dialog' installed on system, have zenity. perhaps similar. zenity returns choice(s), string, output when running command. string may need parsed.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] bash dialog --checklist


Ubuntu

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor