#!/bin/csh
# tstring - C Shell script to print # good tstring samples
#

set today1 = `date -u +%y%j`
set today2 = `date -u +%Y%j`
set can = m3
set ndays = 7
if ($#argv > 0) set can = $1
if ($#argv > 1) set ndays = $2

cd /oasis/$can/tstring

if ( $can == m4 ) then
	tstring.m4
	exit
endif

echo "       Total  -------Good Samples by ID Number-------"
echo "Day   Samples #00 #01 #02 #03 #04 #05 #06 #07 #08 #09"

@ day = $today1 - $ndays
while ( $day <= $today1 )
	if ( -e $day ) \
	    awk -f /oasis/bin/tstring.awk day=$day $day
	@ day++
end

@ day = $today2 - $ndays
while ( $day <= $today2 )
	if ( -e $day ) \
	    awk -f /oasis/bin/tstring.awk day=$day $day
	@ day++
end
