Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Begin of A_HL_INT_GPRS_CGDSCONT_0000
- Passed
- End of A_HL_INT_GPRS_CGDSCONT_0000
- Begin of A_HL_INT_GPRS_CGDCONT_0002
- FAILED
- End of A_HL_INT_GPRS_CGDCONT_0002
- #! /bin/bash
- echo "Enter the logfilename : "
- read logfilename
- echo "Entered name : $logfilename"
- echo "outside the while loop"
- let success=0
- let failure=0
- let total=0
- DONE=false
- until $DONE; do
- read line || DONE=true
- echo "$line" | grep "Begin of "
- if (echo "$line" | grep -i "PASSED") then
- ((success++))
- fi
- if (echo "$line" | grep -i "FAILED") then
- ((failure++))
- fi
- if (echo "$line" | grep "End of ") then
- ((total++))
- fi
- done < "$logfilename"
- echo "Total testcases : $total"
- echo "Total testcase with Success : $success"
- echo "Total testcase with Failure : $failure"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement