Advertisement
Tariqul_Islam

'Awk' - 3

Aug 16th, 2020
1,289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.15 KB | None | 0 0
  1. #!/bin/bash
  2. awk {'
  3. avg=($2+$3+$4)/3;
  4. printf "%c %d %d %d : ", $1,$2,$3,$4;
  5. if (avg<50)
  6. print "FAIL";
  7. else if (avg<80)
  8. print "B";
  9. else
  10. print "A";
  11. '}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement