I have a text file containing a list of student grades:
Andrew cooking A
Andrew cooking B
Andrew computing F
Steven java C
Steven python E
Ben C++ D
Ben python C
Jamie java E
Jamie C++ E
Jamie C++ B
Jamie python E
Gerry python E
Phil python F
I am trying to use the grep command to show all python results, sorted from best to worst grade. The file is called a.txt. I have tried grep python a.txt | sort -d which doesn't work, so I was looking for a bit of help on this.
Thanks
sort -dk3