cookchar

Grade Grapher

Jun 3rd, 2020
1,163
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # Takes a CSV file (filename as first argument) with the columns "Class,Subject,ID,Semester,Grade",
  4. # and outputs per-subject graphs.
  5. #
  6. # termgraph, the graphing program is in the AUR and most similar repositories.
  7. # It's also on github for source builders.
  8.  
  9. for FOO in $(awk -F , '{print $2}' $1 | uniq | tail -n +2)
  10. do
  11.     \grep $FOO $1 | awk -F, '{print $2,$3,$1";"$5}' | termgraph --title $FOO --delim ";" --suffix "/ 4.00"
  12. done
RAW Paste Data