#!/bin/bash # This script takes each line of the input file supplied as the 1st argument # and executes the accompanying script (assumed to be in this dir) # called check_sim_results.sql # The connection string which is the second argument. # NOTE: This script will likely take quite a long time since there are many calib tables!! # Arguments: # 1) name of input file, each line of which is an input to the sql script # 2) dbase connection string to use. # Example usage: # ./run_check_sim_results.bash ./runfile '/@cdfonprd' # Write a new output file echo 'Log file..' > total_check_compare.log # setup the cdfsoftware... cdf_root=`/bin/csh -f -c "echo ~cdfsoft"` . ${cdf_root}/cdf2.shrc file=$1 while [ "$return" != 1 ] do read word return=$? if [ "$return" == 1 ]; then continue fi #echo $word # Create the sql fragment file: echo @ check_sim_results $word > frag.sql #cat frag.sql # run the sql sqlplus $2 < frag.sql rm frag.sql # now concatenate the log file: echo '***********************' >> total_check_compare.log echo '***********************' >> total_check_compare.log echo process_run : $word >> total_check_compare.log echo '***********************' >> total_check_compare.log echo '***********************' >> total_check_compare.log echo >> total_check_compare.log cat check_sim_results.log >> total_check_compare.log done <$file