Got it. If check_status was run multiple times in the same run of the script, the temp file was getting deleted, but the array that held the list was not getting cleared of previous selections. The end of the check_status function now looks like this. (Next to last line was added)
- Code: Select all
for i in $(echo ${query_list[@]}) ; do
if dpkg -l | grep "$i" ; then
echo "$i is installed" >> status_list.tmp
else
echo "$i is NOT installed" >> status_list.tmp
fi
done
cat status_list.tmp | zenity --text-info
query_list=()
rm status_list.tmp