Code: Select all
#! /bin/bash
title=$(echo "Select")
item='1.Airline Tickets!2.Cars!3.Folding Bike!4.Linux Netbook!5.Lightweight Clothes'
combo()
{
choice=$(yad --title="$title" --text='Travel Items' --form --field='Show:CB' "$item" --button="Exit:1" --button="OK:0")
ret=$?
if [[ $ret -ge 1 ]]; then
exit 0
fi
choice=$(echo $choice | awk 'BEGIN {FS="|" }{print $1}')
echo $item
echo $choice
title=$(echo "$choice")
item=$(echo $item | sed "s/$choice"!"//g" | sed "s/"!"$choice//g")
echo $item
item=$choice"!"$item
}
while true ; do
combo
done