Last active
August 29, 2015 14:01
-
-
Save devanjedi/338a1130502f9913ada4 to your computer and use it in GitHub Desktop.
How to figure out how many matches in a tournament were won by the side batting first (or second)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to find out how many matches were won by the side batting first vs. second in IPL 7 | |
1. copy the text in the 'Results' table (here: http://www.espncricinfo.com/indian-premier-league-2014/engine/series/695871.html) to your clipboard (select, Ctrl-C) | |
2. paste it in a text file (save as say 'ipl7.txt') | |
3. in Terminal (on OSX, Linux, cygwin), type: 'grep runs <path to ipl7.txt> |wc -l' (without quotes) to get the number of matches won by the side batting first. type 'grep wickets <path to ipl7.txt> |wc -l' (without quotes) to get the number of matches won by the side batting second. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will do it in one command.