Re: 4.6.2 early report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, April 11, 2011 07:00:14 AM Duncan did opine:

> gene heskett posted on Sun, 10 Apr 2011 22:18:11 -0400 as excerpted:
> > That isn't where these need to be, they should start a few seconds
> > after kmail has been started.
> 
> That's simple enough.  Use sleep to delay, either alone with relatively
> dumb trial and error to determine how long, or with something like pgrep
> kmail in a loop, to see when kmail starts, and then another arbitrary
> delay after that to let kmail stabilize.  The script can then go in the
> usual startup location and spend most of its time sleeping, until kmail
> has time to come up.
> 
This wait for kmail code snippet falls right thru even when kmail isn't 
running:

==========
DetectKmail="pgrep kmail"
until :
do
        sleep 3
        $DetectKmail
done
==========

As I read the bash docs in the scripting guide, the until loop will run 
till a non-zero output is obtained from the last command in the loop.

     while list; do list; done
     until list; do list; done
              The while command continuously executes the do list as long 
as the last command in list returns an exit status of  zero.   The  until
              command  is  identical  to the while command, except that the 
test is negated; the do list is executed as long as the last command in
              list returns a non-zero exit status.  The exit status of the 
while and until commands is the exit status of the last do list  command
              executed, or zero if none was executed.

  If kmail isn't running $DetectKmail's return s/b a null.  What is my 
mistake?  Ahh, s/b a "while" :, ENOTENOUGHCAFFIENE ;-)

Off to test that.

Thanks Duncan
-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
<http://tinyurl.com/ddg5bz>
<http://www.cantrip.org/gatto.html>
Q:	How do you catch a unique rabbit?
A:	Unique up on it!

Q:	How do you catch a tame rabbit?
A:	The tame way!
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux