Commit 12795161 authored by Samarth Joshi's avatar Samarth Joshi

grepping diff output starting with '>' instead of 'c'

parent c2a33583
#!/bin/bash #!/bin/bash
# wc generated_output.txt |awk '{print $2}' # wc generated_output.txt |awk '{print $2}'
mismatch=$(diff generated_output.txt actual_output.txt | grep "^>" | wc -l)
mismatch=$(diff generated_output.txt actual_output.txt | grep "c" | wc -l)
total=$(wc -l < actual_output.txt) total=$(wc -l < actual_output.txt)
score=$((total-mismatch)) score=$((total-mismatch))
echo "Secured $score marks out of $total" echo "Secured $score marks out of $total"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment