dreport in script file

Jean-Pierre A. Radley appl at jpr.com
Thu Sep 30 08:35:52 PDT 2004


Butch Ammon propounded (on Thu, Sep 30, 2004 at 11:19:58AM -0400):
| 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
| -------------------------------------------------------

In the Unix "test" command,  the 'eq' operator is used to compare Integers.  
To compare Strings, use the '=' operator.

-- 
JP


More information about the Filepro-list mailing list