dreport in script file

Butch Ammon butch at rich.srcoils.com
Thu Sep 30 08:19:58 PDT 2004


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!!

Butch Ammon
Super Radiator Coils
Richmond, VA


More information about the Filepro-list mailing list