filePro/email from Unix script file

Doug Luurs doug at borisch.com
Wed Dec 14 12:48:47 PST 2005


#/usr/bin/partscheck -  Butch  5/2/02
#
/u/appl/fp/dreport purchase -f partscheck -s partscheck -u -p
/tmp/partscheck

if [ -s /tmp/partscheck ]
   then 
	mail -s "parts check report"  kari at rich.srcoils.com <
/tmp/partscheck
	mail -s "parts check report" linda at rich.srcoils.com <
/tmp/partscheck
fi
  _____  

 
Douglas Luurs
  Systems Programmer
  Borisch Mfg Corp
 
Voice: 616-554-9820 x143
Fax: 616-554-9180

If replying to this email, please attach whole message for reference. -
Thank You.

> -----Original Message-----
> From: 
> filepro-list-bounces+doug=borisch.com at lists.celestial.com 
> [mailto:filepro-list-bounces+doug=borisch.com at lists.celestial.
> com] On Behalf Of Butch Ammon
> Sent: Wednesday, December 14, 2005 3:02 PM
> To: filepro-list at lists.celestial.com
> Subject: filePro/email from Unix script file 
> 
> 
> Good afternoon,
> 
> I am trying to help my Minneapolis office (Super Radiator 
> Coils) with an idea 
> they have with filePro on SCO Unix.  I made a real simple 
> script file for them 
> to run a filePro report to a /tmp file.  Then immediately 
> email the /tmp file.
> 
> But... what happens when the filePro report runs and doesn't 
> happen to select 
> any records?  The script file continues and emails a blank report!
> 
> Is there a quick way to kill the script file when the records 
> selected is "0"?
> 
> example:
> --------------------------------------------------------------
> ---------------
> #/usr/bin/partscheck -  Butch  5/2/02
> #
> /u/appl/fp/dreport purchase -f partscheck -s partscheck -u -p 
> /tmp/partscheck mail -s "parts check report" 
> kari at rich.srcoils.com < /tmp/partscheck mail -s "parts check 
> report" linda at rich.srcoils.com < /tmp/partscheck
> --------------------------------------------------------------
> ---------------
> 
> I wrote the tiny script file above in May 2002.  It just runs 
> dreport from our 
> purchasing file, redirects the report to a /tmp file (/tmp 
> partscheck), and then uses the simple "mail" command to email 
> the report to Kari and Linda here at 
> Super Radiator.  ...easy.  ....A 10 second script file to write.
> 
> But again, what happens if there are no records selected?  
> The report will still run, and create a blank /tmp file 
> report and email it anyway.
> 
> Can I use the "trap" command to verify the /tmp file or 
> verify if filePro has 
> run and selected records?  If TRUE then run the mail command 
> and email the 
> report.  If FALSE or "0" records selected, then bail out, 
> quit and exit.
> 
> I know there is a real simple way, but I just can't think of 
> it at the moment.
> 
> Thank you!
> 
> 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
> 


More information about the Filepro-list mailing list