Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. echo "soal 1a"
  2.  
  3. awk -F "\t" '{x[$13] += $21}END{for (a in x) {print x[a], a}}' /home/imanuel/Downloads/Sample-Superstore.tsv | sort -rg | tail -2 | head -1
  4.  
  5.  
  6. echo "soal 1b"
  7. awk -F "\t" '/Central/{x[$11] += $21}END{for (a in x) {print x[a], a}}' /home/imanuel/Downloads/Sample-Superstore.tsv | sort -rg | tail -2
  8.  
  9. echo "soal 1c"
  10.  
  11. awk -F "\t" '{if($11="Texas"||$11="Illinois")}/Central/ {x[$17] += $21}END{for (a in x) {print x[a], a}}' /home/imanuel/Downloads/Sample-Superstore.tsv | sort -rg | tail -10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement