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:
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?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
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
Post a Comment