Rev | Line | |
---|
[1004] | 1 | #!/bin/bash
|
---|
| 2 | #Find out if there is a problem section but no problems by looking for the number for the problem section and then look for the template number for the problems
|
---|
| 3 |
|
---|
| 4 | for i in $(ls -1 PAT_*Ver2.xml)
|
---|
| 5 | do
|
---|
| 6 | if grep -q "11450-4" "$i" && ! grep -q "3.249.11.100.8" "$i"
|
---|
| 7 | then
|
---|
| 8 | #echo "$i" >> FilesWithProblemSectionsThatNeedToBeDeleted.txt
|
---|
| 9 | #for i in $(cat FilesWithProblemSectionsThatNeedToBeDeleted.txt)
|
---|
| 10 | #for i in $(cat FilesWithProblemSectionsThatNeedToBeDeleted.txt)
|
---|
| 11 | #do
|
---|
| 12 | ProblemSectionKeyLine="$(grep -n "11450-4" "$i" |awk -F: '{ print $1 }')"
|
---|
| 13 | Arguments="$(echo "$ProblemSectionKeyLine <component> </component> $i")"
|
---|
| 14 | echo "$Arguments"
|
---|
| 15 | source LineNumberUpDownFunction
|
---|
| 16 | read
|
---|
| 17 | LineNumberUpDownFunction $Arguments
|
---|
| 18 | echo "$SectionInformation"
|
---|
| 19 | a="$(echo "$SectionInformation" | awk -F: '{ print $2 }')"
|
---|
| 20 | #echo " $a " >> FilesWithProblemSectionsThatNeedToBeDeleted.txt
|
---|
| 21 | b="$(echo "$SectionInformation" | awk -F: '{ print $3 }')"
|
---|
| 22 | #echo " $b " >> FilesWithProblemSectionsThatNeedToBeDeleted.txt
|
---|
| 23 | echo "$i Beginning line to delete is $a and ending line is $b"
|
---|
| 24 | #echo "$i" >> FilesToProcess.txt
|
---|
| 25 | sed -in "$a","$b"d "$i"
|
---|
| 26 | grep -q "11450-4" "$i";echo "$?" >> SuccessOrNot.txt
|
---|
| 27 | #done
|
---|
| 28 | fi
|
---|
| 29 | done
|
---|
| 30 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.