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

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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
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
 
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
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
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
 

Recently uploaded (20)

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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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...
 
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
 
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
 
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)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
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
 

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.