Hiyall,
     here's a curious one. I created a batch job called whatareyoudoing
which contains the text you see below. It should be a simple mechanism
which asks the user what they are doing every 15 minutes  and has a
safeguard so that it does not run more than once. The problem is that
the very first time I run it, it's saying that it's running twice. This
one has stumped me. Has anyone found anything similar??

#!/bin/bash
cntr=`/bin/ps ax | /bin/grep whatareyoudoing | /bin/grep -v grep | wc
-l`
if [ $cntr -gt 1 ]; 
then 
  zenity --info --text "Call Logger Is Already Running"
  exit 1
fi
while true
do
sleep 15m
NOW=`date +"%Y|%m|%d|%H|%M|%S"`
echo $NOW "|" `zenity --text "Attivita' :$NOW" --entry --title "X'Qed
Tagħmel Man?" --width 1000 --height 5` >> $HOME/CALLOG &
done



The information contained in this email is confidential and may be privileged. 
It is intended for the addressee only, if you are not the intended recipient 
please notify the sender and delete the email immediately. The contents of this 
email must not be disclosed or copied without the senders consent.
We cannot accept any responsibility for viruses.
Any views expressed in this message are those of the individual sender, except 
where the sender specifically states them to be the view of Philip Toledo 
Limited
_______________________________________________
MLUG-list mailing list
[email protected]
http://linux.org.mt/cgi-bin/mailman/listinfo/mlug-list

Reply via email to