If I am logged in and there is a day change (working across midnight), then
I would prefer the next day's calendar to be generated
Right now I have something in cron.d, maybe cron.daily, and I see there is
something that came with the distribution in .bashrc, and I don't seem to be
getting ANYTHING now, even when I issue a calendar -a from root. I believe I
did get something in the wee hours of the morning and I am wondering if that
blocks out anything from calendar for the day no matter where issued
I am writing from the Windoze side so I will check my Linux partition and
report once I see what happens with the next date change
Lawson, you would greatly aid my sanity if you would interpret your
suggested script!
David
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, June 23, 2001 8:05 AM
Subject: Re: Where to put 'calendar -a'
>
>
> On Sat, 23 Jun 2001, David Turetsky wrote:
>
> > I'm running from the command line but that does not sound like it should
be
> > an obstacle
>
> If you use bash, it will source /etc/profile and ~/.bash_profile for
> console logins (_not_ xterms, unlsee forced by a statment such as
> "source /etc/profile" in ~/.bashrc).
> >
> > However, if possible, I would prefer [if I may be permitted to be
finicky]
> > to have this command executed only once on a given day, rather than each
> > time I log in during the day
> >
> > David
> >
> Well, you'll just have to test that in the shell startup script. How do
> you want to handle the case where a user logs in one day and starts a
> new session the next while still logged in from the day before?
>
> Something like this might do:
>
> #!/bin/sh
> [ `last |grep "$(date +"%a %b %d")"|grep $LOGNAME |wc -l` \
> -eq 1 ] && calendar -a
>
> depending on what it is you really want.
>
> Lawson
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs