Welcome
Welcome to refracta

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

fiddlin with repsit

Refracta Development, Scripts, etc.

Re: fiddlin with repsit

Postby fsmithred » Mon Apr 01, 2013 6:14 pm

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
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Previous

Return to Discuss

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred