#! /bin/sh File_Source_Code="VICTR" CSP_Code="447" Data_Provider_Code="VICTRA" File_Sequence_Number="0000001" # file name format #IPND. # #IPND is a constant # refers to the file type which is "UP" for Upload file # is the File Source #"." is an extension marker # is a file sequence number with leading 0 uploadfilename="IPNDUP${File_Source_Code}.${File_Sequence_Number}" # Testing robyns revord only Testing="0" if [ "$1" = "Testing" ]; then Testing="1" fi awk -v "Testing=$Testing" \ -v "File_Source_Code=$File_Source_Code" \ -v "CSP_Code=$CSP_Code" \ -v "Data_Provider_Code=$Data_Provider_Code" \ -v "File_Sequence_Number=$File_Sequence_Number" \ -v "outfile=$File_Sequence_Number" \ -v "uploadfilename=$uploadfilename" \ -f ipnd1.awk | tee ipnd1.log if [ "$Testing" = "3" ]; then cp "$uploadfilename" ipnd1.txt cp ipnd1.txt 0 split -l 1 0 ipnd1. od -A d -c ipnd1.aa >1 od -A d -c ipnd1.ab >2 od -A d -c ipnd1.ac >3 cat ipnd1.txt echo "----------------------" od -A d -c ipnd1.txt echo "----------------------" fi grep "WARNING:" ipnd1.log >ipnd1.warn grep "ERROR:" ipnd1.log >ipnd1.err # create zip achive rm -rf ipnd1.zip zip -r -9 ipnd1.zip *ipnd* *IPND* rd1 0 1 2 3 exit 0