The reason for this, is that you would probably want the echo command to run very quickly because you want to print the time at a regular interval, printing the contents of a file every second or however often status() is run is quicker than having the entire program run every second
On Mon, Feb 25, 2008 at 2:04 PM, Alex Kilgore <[EMAIL PROTECTED]> wrote: > How are you calling the script > I did this in my .xinitrc before wmii > while true; do perl /home/alex/.wmii-3.5/mail.pl; sleep 60;done & > which should run the script every minute, you dont need to call the script > from wmiirc at all > > > > On Mon, Feb 25, 2008 at 1:59 PM, Alex Kilgore <[EMAIL PROTECTED]> > wrote: > > > Im gonna have to think that one through, offhand I am not sure what > > causes this > > > > but I realized theres one problem with doing a ls -al here, it shows . > > and .. and also it shows a total, so you might want to use > > $mail = `ls -Al | wc -l`; > > $mail--; > > and you could incorporate the formatting when you actually write to the > > file > > so it would be like > > print STAT "$mail"." messages"; > > > > > > > > > > > > > > > When I run the script this directory shows in my home: > > > > > > /etpipe_decode=$my_pipe_decode;unsetmy_pipe_decode > > > > > > and it contains the 3 dirs in my INBOX. new, cur, tmp > > > > > > ???? Not shure though what causes this :-/ > > > > > > > > > > > >
