#!/bin/bash/ #The following files must be in the same directory as the QRDA files being processed: #MeasuresAndReportingParametersWithVariables.xml #MEASURES-BY-PATIENT.txt #This script for MyFile in $(ls -1 /home/nancy/CCR-Template/QRDA/PAT_*_QRDA_V1_0_0-11-04-2010_21.xml); do StructuredBodyLine=$(grep -n " tag is added in the Header/Parameter document to anchor the replacement. IT will be deleted when the section is put into the file echo "a is $a start line to delete for /
pairs" echo "b is $b end line to delete" echo "$MyFile" #We can either put this next line in after the fact or before. Currently it is before #sed -in '/structuredBody/{ s/$/\n/ }' "$MyFile" #sed -in "$c"s///p "$MyFile" #MS=$(cat MeasuresAndReportingParametersWithVariables.xml) sed -in "$a","$b"d "$MyFile" #insert the contents of this file after the structured body line sed -in '/MeasuresSection/r MeasuresAndReportingParametersWithVariables.xml' "$MyFile" sed -in s/\// "$MyFile" done rm -rf /home/nancy/CCR-Template/QRDA/PAT*.xmln NewFunction() { File="PAT_$1_QRDA_V1_0_0-11-04-2010_21.xml" shift while [ "0" != "$#" ] do echo "Now I am in the function" echo "$File" echo "$1" sed -in "s///" "$File" sed -in "s/@@@@$1-Item@@@@-->//" "$File" sed -in "s/@@@@$1-Act@@@@-->//" "$File" sed -in "s/@@@@M-Set2011@@@@-->//" "$File" sed -in "s/