#!/bin/sh
#
# /usr/scripts/auto.1
#
# Shell script: example.sh
#
# Author: Kevin FitzGerrell - fitzgerrell@yahoo.com
#
# Consolidates report information and formats it for display.
# CRONTAB runs this script each morning after target report runs.
#
# get the current date in the format used to label the report writer files
NAME=`date +%m-%d-%y`
# assign the path for report writer files
PTH='/opt/fox/rptwrt/rpt_run/'
# target report is "mikes", scheduled every morning at 7:10 am
# the full path and name to the "mikes" report run on 6/22/00 would be
# /opt/fox/rptwrt/rpt_run/mikes.prn/06-22-00.07:10
# using "awk" parse out appropriate appropriate value by matching
# row (ie, first field is DlyAve) and column (ie $2 is value in second column)
ABS_ratio_ave=`awk '{if ($1=="DlyAve") print $2}' ${PTH}mikes.prn/${NAME}.07:10`
CuSO4_dose_ave=`awk '{if ($1=="DlyAve") print $8}' ${PTH}mikes.prn/${NAME}.07:10`
Detox_feed_ave=`awk '{if ($1=="DlyAve") print $10}' ${PTH}mikes.prn/${NAME}.07:10`
Detox_feed_max=`awk '{if ($1=="DlyMax") print $10}' ${PTH}mikes.prn/${NAME}.07:10`
Feed_pH_ave=`awk '{if ($1=="DlyAve") print $13}' ${PTH}mikes.prn/${NAME}.07:10`
Feed_pH_min=`awk '{if ($1=="DlyMin") print $13}' ${PTH}mikes.prn/${NAME}.07:10`
# using Foxboro tool "omset", write variables into the "VALUE" parameter of block
# type "REAL" (in ver 4.1 we used Display Manager Globals instead of REAL blocks)
/opt/fox/bin/tools/omset -v -f $ABS_ratio_ave PID_DTOX:ABSRATIO.VALUE
/opt/fox/bin/tools/omset -v -f $CuSO4_dose_ave PID_DTOX:CUSO4DOSE.VALUE
/opt/fox/bin/tools/omset -v -f $Detox_feed_ave PID_DTOX:DTXFEED.VALUE
/opt/fox/bin/tools/omset -v -f $Detox_feed_max PID_DTOX:DTXFDMAX.VALUE
/opt/fox/bin/tools/omset -v -f $Feed_pH_ave PID_DTOX:DTXFDPH.VALUE
/opt/fox/bin/tools/omset -v -f $Feed_pH_min PID_DTOX:DTXFDPHMIN.VALUE
Text file Source (historic): geocities.com/fitzgerrell/dcs_stuff/raw_scripts
geocities.com/fitzgerrell/dcs_stuffgeocities.com/fitzgerrell
(to report bad content: archivehelp @ gmail)
|
|
|
|
|