source: ccr2ccd-xslt/trunk/make/FixQRDA-M1Only-TestShortDateReadsVer15.sh@ 1299

Last change on this file since 1299 was 1000, checked in by George Lilly, 14 years ago

Fix QRDA shell script

File size: 18.4 KB
Line 
1#!/bin/bash
2
3#there are many reads and comments in this document for debugging
4#This scipt requires a provider organization file for each provider to be in the directory, and AllM1EncounterCodes.txt,
5
6
7
8#cat PAT_100146_QRDA_V1_0_0.xml|grep SSN
9#Find out which files to edit and assign them to the variable "MyFile". As you can see, here I loop through particular files in the same directory with this script
10
11for MyFile in $(ls /home/nancy/CCR-Template/M1-*0.xml)
12do
13
14#cp $MyFile $MyFile"BU"
15#Replace where is just says SSN for the patient with the SSN ID HL7 number
16#since this is a medicare patient, no privacy violation as that will also appear in the Payer's section
17
18echo "xml files are in the directory"
19read
20
21#replace the @@@UUID-DOC@@@,@@@UUID-SET@@@ and @@@UUID-PAYER@@@ with UUIDs
22#should probably do that in the problem section as well with WV HL7 ID as root and UUID as an extension for now
23
24VerNum=$(grep versionNumber "$MyFile"|awk -F\" '{print $2}')
25echo "$VerNum"
26
27if [ "1" = "$VerNum" ]
28then
29 #uuid is a Linux command that generates a new uuid
30 u=$(uuid)
31 sed -i s/'@@@UUID-DOC@@@'/$u/ $MyFile
32
33 sed -i s/'@@@UUID-SET@@@'/$u/ $MyFile
34 sed -i s/'@@@UUID-PAYER@@@'/$u/ $MyFile
35
36else
37 echo "UUIDs should remain unchanged because this is not the first version of this document"
38
39fi
40echo "replace UUID site markers"
41u=""
42VerNum=""
43read
44
45
46#make sure <state></state> is no longer than two
47
48echo "Fix the state line length"
49
50sed -i 's/Alabama/AL/gI' $MyFile
51sed -i 's/Alaska/AK/gI' $MyFile
52sed -i 's/Arizona/AZ/gI' $MyFile
53sed -i 's/Arkansas/AR/gI' $MyFile
54sed -i 's/California/CA/gI' $MyFile
55sed -i 's/Colorado/CO/gI' $MyFile
56sed -i 's/Connecticut/CT/gI' $MyFile
57sed -i 's/Delaware/DE/gI' $MyFile
58sed -i 's/District of Columbia/DC/gI' $MyFile
59sed -i 's/Florida/FL/gI' $MyFile
60sed -i 's/Georgia/GA/gI' $MyFile
61sed -i 's/Hawaii/HI/gI' $MyFile
62sed -i 's/Idaho/ID/gI' $MyFile
63sed -i 's/Illinois/IL/gI' $MyFile
64sed -i 's/Indiana/IN/gI' $MyFile
65sed -i 's/Iowa/IA/gI' $MyFile
66sed -i 's/Kansas/KS/gI' $MyFile
67sed -i 's/Kentucky/KY/gI' $MyFile
68sed -i 's/Louisiana/LA/gI' $MyFile
69sed -i 's/Maine/ME/gI' $MyFile
70sed -i 's/Maryland/MD/gI' $MyFile
71sed -i 's/Massachusetts/MA/gI' $MyFile
72sed -i 's/Michigan/MI/gI' $MyFile
73sed -i 's/Minnesota/MN/gI' $MyFile
74sed -i 's/Mississippi/MS/gI' $MyFile
75sed -i 's/Missouri/MO/gI' $MyFile
76sed -i 's/Montana/MT/gI' $MyFile
77sed -i 's/Nebraska/NE/gI' $MyFile
78sed -i 's/Nevada/NV/gI' $MyFile
79sed -i 's/New Hampshire/NH/gI' $MyFile
80sed -i 's/New Jersey/NJ/gI' $MyFile
81sed -i 's/New Mexico/NM/gI' $MyFile
82sed -i 's/New York/NY/gI' $MyFile
83sed -i 's/North Carolina/NC/gI' $MyFile
84sed -i 's/North Dakota/ND/gI' $MyFile
85sed -i 's/Ohio/OH/gI' $MyFile
86sed -i 's/Oklahoma/OK/gI' $MyFile
87sed -i 's/Oregon/OR/gI' $MyFile
88sed -i 's/Pennsylvania/PA/gI' $MyFile
89sed -i 's/Rhode Island/RI/gI' $MyFile
90sed -i 's/South Carolina/SC/gI' $MyFile
91sed -i 's/South Dakota/SD/gI' $MyFile
92sed -i 's/Tennessee/TN/gI' $MyFile
93sed -i 's/Texas/TX/gI' $MyFile
94sed -i 's/Utah/UT/gI' $MyFile
95sed -i 's/Vermont/VT/gI' $MyFile
96sed -i 's/Virginia/VA/gI' $MyFile
97sed -i 's/Washington/WA/gI' $MyFile
98sed -i 's/West Virginia/WV/'gI $MyFile
99sed -i 's/Wisconsin/WI/gI' $MyFile
100sed -i 's/Wyoming/WY/gI' $MyFile
101sed -i 's/American Samoa/AS/gI' $MyFile
102sed -i 's/Guam/GU/gI' $MyFile
103sed -i 's/Northern Mariana Islands/MP/gI' $MyFile
104sed -i 's/Puerto Rico/PR/gI' $MyFile
105sed -i 's/Virgin Islands/VI/gI' $MyFile
106sed -i 's/West VA/WV/gI' $MyFile
107sed -i 's/N Carolina/NC/gI' $MyFile
108sed -i 's/N Dakota/ND/gI' $MyFile
109sed -i 's/S Carolina/SC/gI' $MyFile
110sed -i 's/S Dakota/SD/gI' $MyFile
111sed -i 's/Puerto Rico/PR/gI' $MyFile
112sed -i 's/Virgin Islands/VI/gI' $MyFile
113sed -i 's/"W. VA"/WV/gI' $MyFile
114sed -i 's/"N. Carolina"/NC/gI' $MyFile
115sed -i 's/"N. Dakota"/ND/gI' $MyFile
116sed -i 's/"S. Carolina"/SC/gI' $MyFile
117sed -i 's/"S. Dakota"/SD/gI' $MyFile
118sed -i 's/"R.I."/RI/gI' $MyFile
119
120
121#Fix the state entries
122
123(grep -n '<state>' $MyFile |awk -F\: '{print $1}') >> statetags.txt
124
125for i in $(cat statetags.txt);
126do
127StateLineLength=$(sed -n "$i"p "$MyFile" | sed 's/^[ \t]*//' |awk '{print length}')
128
129echo "StateLineLength is $StateLineLength"
130if [ ! "17" = "$StateLineLength" ]
131then
132
133cat -n $MyFile | grep '<state>';echo "$MyFile"
134echo "Urgent there is a problem with the <state> tag in $MyFile"
135read
136
137fi
138done
139
140StateLineLength=""
141rm -rf statetags.txt #UNCOMMENT THIS!!!
142
143echo "$MyFile"
144a1=$(grep -n \"SSN\" $MyFile | awk -F\" '{print $2}'); echo "$a1"
145echo "$a1 is the line with SSN on it"
146sed -i s/@@SSN@@/"$a1"/ $MyFile
147sed -i 's/SSN/2.16.840.1.113883.4.1/' $MyFile
148a1=""
149
150
151echo "SSN code added"
152echo "About to start fixing the problem section"
153read
154
155
156
157
158
159#PROBLEM SECTION 1 FIX - TEMPLATE
160#Add the added template line after 2.16.840.1.113883.10.20.1.50
161sed -in /"2.16.840.1.113883.10.20.1.50"/s/$/"\\n<templateId root=\"2.16.840.1.113883.3.249.11.100.12\"\\/>"/ "$MyFile"
162cat -n "$MyFile" | grep "3.249.11.100.12"
163
164read
165#PROBLEM FIX 2 - TABLE
166#Remove the table in the beginning of the section
167ProblemSectionKey=$(grep -n "11450-4" "$MyFile" | awk -F: '{print $1}')
168grep -n "2.16.840.1.113883.10.20.1.27" "$MyFile" | awk -F: '{print $1}' >> Problem27TemplateLines.txt
169read
170startline="$ProblemSectionKey"
171endline="$(head -1 Problem27TemplateLines.txt)"
172echo "$startline is startline"
173echo "$endline is endline"
174cat -n "$MyFile" | grep '<table>'
175#Remove the table at the beginning of the problem section but leaves <text/>
176sed -in "$startline,$endline{ s/<text>/<text\/>\n<text>/ }" "$MyFile"
177sed -in "$startline,$endline{ /<text>/,/<\/text>/d }" "$MyFile"
178
179# this in an example of one that works
180#sed -in "$startline,$endline{ /<table>/,/<\/table>/d }" M1-PAT_100839_QRDA_V1_0_0.xml
181cat -n "$MyFile" | grep '<table>'
182echo "Done removing the table"
183startline=""
184endline=""
185rm -rf Problem27TemplateLines.txt
186rm -rf MyValueLinesInProblems.txt
187#PROBLEM SECTION FIX 3 - TEXT TAGS
188#Remove <text> </text> section near effectiveTime
189read
190
191index="0"
192grep -n "2.16.840.1.113883.3.249.11.100.8" $MyFile | awk -F: '{print $1}' >> MyTextLinesKeysProblems.txt
193for i in $(cat MyTextLinesKeysProblems.txt);
194do
195startline="$(($i+$index))"
196endline="$(($i+$index+10))"
197sed -in "$startline,$endline{ /<text>/,/<\/text>/d }" "$MyFile"
198index="$((index-3))"
199done
200index=""
201starline=""
202endline=""
203rm -rf MyTextLinesKeysProblems.txt
204echo "done removing <text>"
205read
206
207#PROBLEM SECTION 4 FIX - REMOVE BAD VALUE LINE
208#remove the value tags after the 2.16.840.1.113883.10.20.1.50 enty
209index="0"
210echo "value Lines in Problems about to be written to screen and then the file"
211#grep -n "2.16.840.1.113883.10.20.1.50" $MyFile | awk -F: '{print $1}'
212grep -n "2.16.840.1.113883.10.20.1.50" $MyFile | awk -F: '{print $1}' >> MyValueLinesInProblems.txt
213for i in $(cat MyValueLinesInProblems.txt);
214do
215startline="$((i+index))"
216endline="$(($i+index+8))"
217#sed -in "$startline,$endline{ /<value>/,/<\/value>/d }" "$MyFile"
218sed -in "$startline,$endline{ /<value>/,/<\/value>/d }" "$MyFile"
219echo "a value line was deleted from the $startline area"
220index="$((index-3))"
221done
222index=""
223starline=""
224endline=""
225cat MyValueLinesInProblems.txt
226rm -rf MyValueLinesInProblems.txt
227echo "done removing bad value lines"
228read
229
230#PROBLEM SECTION 5 FIX - ADD GOOD VALUE LINE
231
232#Put in a good value line if there are bad ones
233
234cat -n "$MyFile" | grep "55561003"; echo "greped 55561003"
235cat -n "$MyFile" | grep "2.16.840.1.113883.3.249.11.100.12";echo "grepped 2.16.840.1.113883.3.249.11.100.12"
236cat -n "$MyFile" | grep "2.16.840.1.113883.10.20.1.50"; echo "grepped 2.16.840.1.113883.10.20.1.50"
237echo " about to add xsi value lines with sed"
238read
239
240#sed -in '/"2.16.840.1.113883.10.20.1.50"/{n;n;n;s/$/\n<value xsi:type="CE" code="55561003" codeSystem="2.16.840.1. 113883.6.96" displayName="Active" codeSystemName="SNM" \/>/}' "$MyFile"
241sed -in '/"2.16.840.1.113883.10.20.1.50"/{N;N;N;s/$/\n<value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96" displayName="Active" codeSystemName="SNM" \/>/}' "$MyFile"
242#echo "value Lines in Problems about to be written to screen and then the file"
243#grep -n "2.16.840.1.113883.10.20.1.50" $MyFile | awk -F: '{print $1}'
244#grep -n "2.16.840.1.113883.10.20.1.50" $MyFile | awk -F: '{print $1}' >> MyValueLinesInProblems.txt
245#for i in $(cat MyValueLinesInProblems.txt)
246#do
247# sed -in "$i","$((i+6))"p "$MyFile"
248#done
249#rm -rf MyValueLinesInProblems.txt
250echo "done adding good value line"
251read
252
253#PROBLEM #6 - XSI PROBLEM
254#Fix the missing xsi:code value lines
255#Fix any wrong value elements in the problem section
256#I don't think there are any
257
258#cat MyStatusTemplates.txt
259#echo "above checking the MyStatusTemplates.txt file content"
260read
261
262echo "issuing the sed command to delete the buffer"
263
264sed -e 'd' /home/nancy/CCR-Template/MyFile.txt
265read
266Startline="$(cat "$MyFile" | grep -n "11450-4" | awk -F: '{print $1}')"
267grep -n "2.16.840.1.113883.10.20.1.50" "$MyFile" | awk -F: '{print $1}' >> MyStatusTemplates.txt
268Endline="$(tail -1 MyStatusTemplates.txt)"
269cat -n "$MyFile" | grep '<value code'
270echo "Endline is $Endline"
271echo "startline is $Startline"
272
273#echo 'about to run the sed -fix the xsi code"
274#sed -in "158,401{ s/<value code/<value xsi:type=\"CD\" code/ }" "$MyFile"
275sed -in "$Startline,$Endline{ s/<value code/<value xsi:type=\"CD\" code/ }" "$MyFile"
276sed -in "$Startline,$Endline{ s/<value displayName/<value xsi:type=\"CD\" displayName/ }" "$MyFile"
277
278StartLine=""
279Endline=""
280rm -rf MyStatusTemplates.txt
281echo "done checking for bad value lines"
282read
283
284
285#Done fixing Problem Section**********
286
287#Fix that dummy number they gave us with the right entry for Matt or Nancy
288echo "if grep -q Nancy $MyFile then"
289if grep -q Nancy $MyFile then
290then
291 sed -i 's/6558574524/1558574525/' $MyFile
292else
293 sed -i 's/6558574524/1124022827/' $MyFile
294fi
295
296echo "read change NPIs for Matt and Nancy"
297read
298#Line adminstrative gender code is on
299a=$(grep -n birthTime $MyFile|awk -F: '{print $1}')
300
301sed -i 's/AdministrativeGender\"\ codeSystem=\"\"/AdministrativeGender\"\ codeSystem=\"2.16.840.1.113883.5.1\"/' $MyFile
302#sed -i 's/AdministrativeGender\"\ codeSystem=\"\"/codeSystem=\"2.16.840.1.113883.5.1\"/' $MyFile
303#sed -i 's/administrativeGenderCode displayName=\"FEMALE\"/administrativeGenderCode/' $MyFile
304#sed -i 's/administrativeGenderCode displayName=\"MALE\"/administrativeGenderCode/' $MyFile
305
306#now that the adminstrativeGenderCode is fixed, save it in a variable
307agc=$(grep AdminstrativeGender $MyFile)
308
309echo "Moving header including up to birthTime into MyNewFile.xml"
310#Send the part of the file up to and including administrativeGenderCode and birthTime to MyNewFile
311head -"$a" $MyFile >> MyNewFile.xml
312
313a=""
314agc=""
315read
316#the race and ethnicity will eventually come from the CCR Social History
317#orde needs to be adminGender, birthTIme, race, ethnicity
318#Now add the administrative gender
319
320
321#now add the race code line to my new file
322#right now everybody is native Hawaiian until we get this fixed!
323#Plan to use only the existing VistA codes which match meaningful use
324echo '<raceCode code="2076-8" codeSystem="2.16.840.1.113883.5.104"/>' >> MyNewFile.xml
325echo '<ethnicGroupCode code="2186-5" codeSystem="2.16.840.1.113883.5.50"/>' >> MyNewFile.xml
326echo '</patient>' >> MyNewFile.xml
327
328tail -6 MyNewFile.xml
329
330#the race and ethnicity that will eventually come from the CCR Social History
331echo "fix administrativeGender, birthTime, raceCode and ethnicGroup"
332read
333#copy the lines with the birthTime and <patient> and into the file in tieir proper place
334#by pulling their locatin from the original file relative to the administrativeGenderCode line
335
336
337#The providerOrganization sectiono is missing entrirely so put it in from these hard coded files for Matt and Nancy
338#in their proper place right after the </patient tag
339
340if grep -q Nancy $MyFile
341 then
342 cat NancysProviderOranization.txt >> MyNewFile.xml
343else
344 cat MatthewsProviderOranization.txt >> MyNewFile.xml
345fi
346#this just adds a line feed to MyNewFile.xml
347echo >> MyNewFile.xml
348
349echo "read Provider organizaton added"
350read
351#put the document beginning with /patientRole until the </participant> tag that is 2 lines after the only incidence of </associated person just before the <documentationOf> into MyNewFile.xml
352d=$(grep -n "/patientRole" $MyFile|awk -F: '{print $1}');echo $d
353e=$(($d+1));echo $e
354f=$(grep -n "/associatedPerson" $MyFile|awk -F: '{print $1}');echo $f
355g=$(($f+2));echo $g
356cat $MyFile | sed -n $d,$g"p" >> MyNewFile.xml
357#now add in the </patient role and </recordTarget>
358echo "read /patientRole to /participant Person added"
359read
360#now add the documentation of pulling the data from the encounter procedures later in the document. Searches for Encounters that are
361#appropriate for the measure which will be in Encounter.txt
362
363#!!!!ADD MATT HERE
364for i in $(cat AllM1EncounterCodes.txt);
365 do
366 echo $i
367 if grep -q $i $MyFile
368 then
369 echo $(grep -n $i $MyFile | awk -F: '{print $1}') >> Encounters.txt
370 fi
371done
372cat Encounters.txt
373for i in $(cat Encounters.txt);
374 do
375 echo
376 echo "<documentationOf>" >> MyNewFile.xml
377 echo "<serviceEvent>" >> MyNewFile.xml
378 cat $MyFile | sed -n $i"p" >> MyNewFile.xml
379 x=$(($i+5)); echo $x
380 y=$(($i+8)); echo $y
381 echo "sed -n "$x","$y"p >> MyNewFile.xml"
382 cat "$MyFile" | sed -n "$x","$y"p >> MyNewFile.xml
383 cat EndDocumentationOfSectionNancy.txt >> MyNewFile.xml
384 #added a line feed
385 echo >> MyNewFile.xml
386 #for testing
387 tail MyNewFile.xml
388
389 done
390rm -rf Encounters.txt
391y=""
392x=""
393
394echo "read documentationOf added and each section of that tailed -10"
395read
396#takes the low value date and puts it in the high value if the the is a nullFlavor there and it also corrects the dates by adding a 0
397#in the 5th digit position if the date is 7 long instead of 8 and a zero in the 5th and next to the last position if the date is 6 long (ie,too short in either the low or high value) The latter is fixed now so it can be trimmed out - soon All dates and times are 8 or more
398echo "<component>" >> MyNewFile.xml
399p=$(grep -n '<structuredBody>' $MyFile | awk -F: '{print $1}')
400q=$(grep -n '</ClinicalDocument>' $MyFile | awk -F: '{print $1}')
401cat "$MyFile" | sed -n "$p","$q"p >> MyNewFile.xml
402# take out <high nullFlavor="UNK"/> and replace it with the same value that is in low value everywhere it appears
403
404grep -n '<high nullFlavor="UNK"/>' MyNewFile.xml | awk -F: '{print $1}' >> NullFlavorTimes.txt
405#NullFlavorTimes.txt has the line numbers
406for i in $(cat NullFlavorTimes.txt);
407 do
408 #low value is one line above the high value with the nullFlavor, so get the date as it is
409 l=$(($i-1));echo $l
410 m=$(sed -n "$l"p MyNewFile.xml)
411 n=$(echo "$m" | awk -F\" '{print $2}')
412 u=$(echo "${#n}")
413 #fixes the date in low value if it is 7 long
414 if [ $u = 7 ]
415 then
416 v=$(echo $n |cut -c1-4)
417 w=$(echo $n |cut -c5-7)
418 j=$(echo $v"0"$w);echo $n
419 sed -i "$l"s/"$n"/"$j"/ MyNewFile.xml
420 n="$j"
421 #fixes the date if it is 6 long
422 elif [ $u = 6 ]
423 then
424 v=$(echo $n |cut -c1-4)
425 w=$(echo $n |cut -c5)
426 x=$(echo $n |cut -c6)
427 j=$(echo $v"0"$w"0"$x);echo $n
428 sed -i "$l"s/"$n"/"$j"/ MyNewFile.xml
429 n="$j"
430 fi
431 #now puts the low value corrected date in the high value
432 o="value="\""$n"\"""
433 echo $o
434 echo $i
435 #echo "sed -i "$i"s/nullFlavor=\"UNK\"/$o/ MyNewFile.xml"
436 sed -i "$i"s/'nullFlavor=\"UNK\"'/"$o"/ MyNewFile.xml
437done
438rm -rf NullFlavorTimes.txt
439
440l=""
441m=""
442n=""
443u=""
444v=""
445w=""
446j=""
447o=""
448i=""
449echo "read NullFlavorTimes Fixed"
450#
451read
452
453
454#Remove all of the sections that are not for M1 which begin 2 lines before the PQRI-2 entry and end 2 lines before the reporting parameters code entry 55187.9 This section to be developed
455
456
457
458#Now remove the Procedures section from the M1 report as the procedures are not in the downloadable resource table. Need to find the code 47519-4 and delete the whole component that begins with <component> and and goes to the </component> immediately after the code line.47519-4 is the code for the procedures section
459if grep -q "47519-4" MyNewFile.xml
460then
461#Sets a to the line number with the code in it
462LineNum="$(grep -n "47519-4" MyNewFile.xml|awk -F: '{print $1}')"
463echo "$LineNum"
464
465
466#about two lines above line with 47519-4 in it is a line that is just <component>. Go backward one line at a time and find the line number of that line which is set to a1
467#GrepForComponentLineNumber returns $? with 0 is true and 1 is false
468#work backwards from LineNum to find the line with <component> in it
469
470Result="$(sed -n "$LineNum"p MyNewFile.xml | grep -n "<component>";echo $?)"
471echo "$Result"
472echo "$LineNum"
473echo "$(($LineNum-1))"
474while [ "1" = "$Result" ];
475do
476 LineNum="$(($LineNum-1))"
477 echo "$LineNum"
478 Result="$(sed -n "$LineNum"p MyNewFile.xml | grep -n "<component>";echo $?)"
479done
480
481BeginLineNum="$LineNum"; echo "BeginLineNum is $BeginLineNum"
482
483#initialize EndLineNum which will ultimately be the line with the ending component tag, </component>
484EndLineNum="$(($LineNum+1))"; echo "EndLineNum is $EndLineNum"
485
486#This is to check the line and if it does not contain </component>, add 1 to EndLineNum and go to the next line and check that one
487
488Result2="$(sed -n "$EndLineNum"p MyNewFile.xml | grep -n '</component>';echo "$?")"
489echo "Result2 is $Result2"
490while [ "$Result2" = "1" ];
491do
492 EndLineNum="$(($EndLineNum+1))"
493 echo "EndLineNum is $EndLineNum"
494 Result2="$(sed -n "$EndLineNum"p MyNewFile.xml | grep -n '</component>';echo "$?")"
495done
496echo "Beginning line Number of the Procedure Section is $BeginLineNum"
497echo "Ending Line Number of the Procedure Section is $EndLineNum"
498#Now delete the procedure section
499
500sed -in "$BeginLineNum","$EndLineNum"d MyNewFile.xml
501fi
502
503echo "read deleted the procedures section"
504read
505
506
507#Replace anything with SNOMED or SNOMED-CT with SNM and replace anything with ICD9CM with I9 and and replace where it says codeSystem="" in the problem list with codeSysetm="2.16.840.1.113883.6.103"
508#in lines that contain ICD9CM, replace codeSystem="" with codeSystem="2.16.840.1.113883.6.103"
509sed -i '/ICD9CM/s/codeSystem=\"\"/codeSystem=\"2.16.840.1.113883.6.103\"/' MyNewFile.xml
510sed -i 's/SNOMED-CT/SNM/' MyNewFile.xml
511sed -i 's/ICD9CM/I9/' MyNewFile.xml
512sed -i 's/ICD9/I9/' MyNewFile.xml
513sed -i 's/SNOMED/SNM/' MyNewFile.xml
514
515
516#Now put out a new file that has the same name as the original with Ver2 at the end which will contain the corrected header
517echo "replace the codes with their proper names"
518#read
519
520
521cp MyNewFile.xml $(echo $MyFile | echo $(awk -F. '{print $1}')"Ver2.xml")
522#mv MyNewFile.xml $(echo $MyFile | echo $(awk -F. '{print $1}')"Ver2.xml")
523if grep -q 30954-2 MyNewFile.xml
524then
525echo "$MyFile contains results" >> FilesWithResults.txt
526echo "$MyFile contains results"
527fi
528rm -rf MyNewFile.xml
529rm -rf MyNewFile.xmln
530echo "this is the end"
531#read
532echo "end $MyFile"
533done
534
535echo "read FilesWithResults.txt has the names of files for running the results script"
536read
537exit
Note: See TracBrowser for help on using the repository browser.