dreport in script file

Enrique Arredondo henry at vegena.net
Thu Sep 30 08:30:18 PDT 2004



On Thu, 30 Sep 2004, Butch Ammon wrote:

> Good morning....
>
> I have a real short, tiny, script file that will only run dreport on Mondays.
> My problem is that I am missing something, and/or not clear on Unix script
> files.
>
> This /usr/bin/shopreq file is full read/write/execute.  I want to put this entry
> into a users .profile, so when they log in each day in the morning, if the day
> happens to be Monday, it will run the dreport output.  If any other day, it will
> do something basic, like, display "Today is:".
>
> This script runs dreport no matter what day it is!!!  What am I doing wrong?
>
> -------------------- cut 'n paste --------------------
> #
> day=`date +%a`
> if [ "$day" -eq Mon ]
> then
> /u/appl/fp/dreport purchase -f shopreq -s shopreq -v shopreq.v -u -pt
> else
> echo "Today is:" $day
> fi
> -------------------------------------------------------
>
> How can you get the above script to only run on Monday?  Aaaaaaargh!!

I use :

day=`date +%a`

if [ $day = Mon ]
   then
    pause "It's Monday"
   else
    pause "Not Monday"
fi


More information about the Filepro-list mailing list