dreport in script file
Todd H
toddh at mangobay.com
Thu Sep 30 08:38:36 PDT 2004
----- Original Message -----
From: "Butch Ammon" <butch at rich.srcoils.com>
To: <filepro-list at lists.celestial.com>
Sent: Thursday, September 30, 2004 11:19 AM
Subject: dreport in script file
> 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
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
try this:
dow=`date +%a`
case $dow in
Mon) /u/appl/fp/dreport purchase -f shopreq -s shopreq -v
shopreq.v -u -pt;;
*) echo "Today is "$dow;;
esac
More information about the Filepro-list
mailing list