Commit c2a33583 authored by Samarth Joshi's avatar Samarth Joshi

Fixed bug where wc was taken from words instead than lines

parent 038dd69a
#!/bin/sh #!/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 "c" | wc -l) mismatch=$(diff generated_output.txt actual_output.txt | grep "c" | wc -l)
total=$(wc actual_output.txt |awk '{print $2}') total=$(wc -l < actual_output.txt)
score=$(echo $total-$mismatch | bc) 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