SlideShare a Scribd company logo
1 of 5
15: How can I use GNU coreutils
& other command line tools to
determine the total number of
runs the winningest team
scored in 2016?
By: Alexander Bitar
On your vagrant machine execute the following to
discover the winningest team and store it as a
bash variable (WinTeam):
• WinTeam=$(awk -F, '{if($10>$11) print $4; else if ($11>$10) print $7;}' GL2016.TXT
| awk -F, '{a[$1]++;} END{for (i in a) print i, a[i];}'| sort -nrk2 | head -1 | cut -d' ' -
f1)
Execute the following command to ensure
that the variable has stored :
• echo $WinTeam
Once we ensure that our Bash Variable is stored,
we can execute the following analysis to retrieve
the total number of runs for the Winningest Team:
• awk –F, -v WinTeam=$WinTeam‘{If($7==WinTeam) print $11; else if
($4==WinTeam) print $10}’ GL2016.TXT | paste –sd+ | bc
The Winningest Team has scored a total of
808 runs in the 2016 Season.

More Related Content

More from Alexander Bitar

04 22-2018-tcpdump red-80
04 22-2018-tcpdump red-8004 22-2018-tcpdump red-80
04 22-2018-tcpdump red-80Alexander Bitar
 
04 18-2018--nmap port-80_blue_after_netcat
04 18-2018--nmap port-80_blue_after_netcat04 18-2018--nmap port-80_blue_after_netcat
04 18-2018--nmap port-80_blue_after_netcatAlexander Bitar
 
04 18-2018--netcat port-80_blue
04 18-2018--netcat port-80_blue04 18-2018--netcat port-80_blue
04 18-2018--netcat port-80_blueAlexander Bitar
 
04 12-2018-scp ubnetdef-to_blue
04 12-2018-scp ubnetdef-to_blue04 12-2018-scp ubnetdef-to_blue
04 12-2018-scp ubnetdef-to_blueAlexander Bitar
 
04 12-2018-scp ubnetdef-to_blue_tmp
04 12-2018-scp ubnetdef-to_blue_tmp04 12-2018-scp ubnetdef-to_blue_tmp
04 12-2018-scp ubnetdef-to_blue_tmpAlexander Bitar
 
04 09-2018--internal networkconnection
04 09-2018--internal networkconnection04 09-2018--internal networkconnection
04 09-2018--internal networkconnectionAlexander Bitar
 
04 09-2018--ssh red-to_blue
04 09-2018--ssh red-to_blue04 09-2018--ssh red-to_blue
04 09-2018--ssh red-to_blueAlexander Bitar
 
04 09-2018--ssh blue-to_red
04 09-2018--ssh blue-to_red04 09-2018--ssh blue-to_red
04 09-2018--ssh blue-to_redAlexander Bitar
 
04 02-2018--Slackware Wire Shark Installation
04 02-2018--Slackware Wire Shark Installation04 02-2018--Slackware Wire Shark Installation
04 02-2018--Slackware Wire Shark InstallationAlexander Bitar
 
3 27-2018--update slackware
3 27-2018--update slackware3 27-2018--update slackware
3 27-2018--update slackwareAlexander Bitar
 
3 26-2018--bridged networkcard
3 26-2018--bridged networkcard3 26-2018--bridged networkcard
3 26-2018--bridged networkcardAlexander Bitar
 
3 11-2018--restore snapshot
3 11-2018--restore snapshot3 11-2018--restore snapshot
3 11-2018--restore snapshotAlexander Bitar
 
3 07-2018--add studenttosudo
3 07-2018--add studenttosudo3 07-2018--add studenttosudo
3 07-2018--add studenttosudoAlexander Bitar
 
3 11-2018--change desktoptoxfce
3 11-2018--change desktoptoxfce3 11-2018--change desktoptoxfce
3 11-2018--change desktoptoxfceAlexander Bitar
 
3 11-2018--take snapshot
3 11-2018--take snapshot3 11-2018--take snapshot
3 11-2018--take snapshotAlexander Bitar
 
3 06-2018--add newuserstudent
3 06-2018--add newuserstudent3 06-2018--add newuserstudent
3 06-2018--add newuserstudentAlexander Bitar
 

More from Alexander Bitar (20)

04 22-2018-tcpdump red-80
04 22-2018-tcpdump red-8004 22-2018-tcpdump red-80
04 22-2018-tcpdump red-80
 
04 18-2018--nmap port-80_blue_after_netcat
04 18-2018--nmap port-80_blue_after_netcat04 18-2018--nmap port-80_blue_after_netcat
04 18-2018--nmap port-80_blue_after_netcat
 
04 18-2018--nmap blue
04 18-2018--nmap blue04 18-2018--nmap blue
04 18-2018--nmap blue
 
04 18-2018--netcat port-80_blue
04 18-2018--netcat port-80_blue04 18-2018--netcat port-80_blue
04 18-2018--netcat port-80_blue
 
04 16-2018--nmap blue
04 16-2018--nmap blue04 16-2018--nmap blue
04 16-2018--nmap blue
 
04 12-2018-scp ubnetdef-to_blue
04 12-2018-scp ubnetdef-to_blue04 12-2018-scp ubnetdef-to_blue
04 12-2018-scp ubnetdef-to_blue
 
04 12-2018-scp ubnetdef-to_blue_tmp
04 12-2018-scp ubnetdef-to_blue_tmp04 12-2018-scp ubnetdef-to_blue_tmp
04 12-2018-scp ubnetdef-to_blue_tmp
 
04 09-2018--internal networkconnection
04 09-2018--internal networkconnection04 09-2018--internal networkconnection
04 09-2018--internal networkconnection
 
04 09-2018--clone vm
04 09-2018--clone vm04 09-2018--clone vm
04 09-2018--clone vm
 
04 09-2018--ssh red-to_blue
04 09-2018--ssh red-to_blue04 09-2018--ssh red-to_blue
04 09-2018--ssh red-to_blue
 
04 09-2018--ssh blue-to_red
04 09-2018--ssh blue-to_red04 09-2018--ssh blue-to_red
04 09-2018--ssh blue-to_red
 
04 02-2018--Slackware Wire Shark Installation
04 02-2018--Slackware Wire Shark Installation04 02-2018--Slackware Wire Shark Installation
04 02-2018--Slackware Wire Shark Installation
 
3 27-2018--update slackware
3 27-2018--update slackware3 27-2018--update slackware
3 27-2018--update slackware
 
3 26-2018--bridged networkcard
3 26-2018--bridged networkcard3 26-2018--bridged networkcard
3 26-2018--bridged networkcard
 
3 26-2018--ping google
3 26-2018--ping google3 26-2018--ping google
3 26-2018--ping google
 
3 11-2018--restore snapshot
3 11-2018--restore snapshot3 11-2018--restore snapshot
3 11-2018--restore snapshot
 
3 07-2018--add studenttosudo
3 07-2018--add studenttosudo3 07-2018--add studenttosudo
3 07-2018--add studenttosudo
 
3 11-2018--change desktoptoxfce
3 11-2018--change desktoptoxfce3 11-2018--change desktoptoxfce
3 11-2018--change desktoptoxfce
 
3 11-2018--take snapshot
3 11-2018--take snapshot3 11-2018--take snapshot
3 11-2018--take snapshot
 
3 06-2018--add newuserstudent
3 06-2018--add newuserstudent3 06-2018--add newuserstudent
3 06-2018--add newuserstudent
 

Recently uploaded

Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Recently uploaded (20)

Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

2 18-2018-winningest team-total runs

  • 1. 15: How can I use GNU coreutils & other command line tools to determine the total number of runs the winningest team scored in 2016? By: Alexander Bitar
  • 2. On your vagrant machine execute the following to discover the winningest team and store it as a bash variable (WinTeam): • WinTeam=$(awk -F, '{if($10>$11) print $4; else if ($11>$10) print $7;}' GL2016.TXT | awk -F, '{a[$1]++;} END{for (i in a) print i, a[i];}'| sort -nrk2 | head -1 | cut -d' ' - f1)
  • 3. Execute the following command to ensure that the variable has stored : • echo $WinTeam
  • 4. Once we ensure that our Bash Variable is stored, we can execute the following analysis to retrieve the total number of runs for the Winningest Team: • awk –F, -v WinTeam=$WinTeam‘{If($7==WinTeam) print $11; else if ($4==WinTeam) print $10}’ GL2016.TXT | paste –sd+ | bc
  • 5. The Winningest Team has scored a total of 808 runs in the 2016 Season.