Connor_Shirley Submission#2
Open
DevinLayneShirley wants to merge 10 commits into
Open
Conversation
mdoellma
reviewed
Oct 6, 2017
| @@ -0,0 +1,29 @@ | |||
| # Takes wages.csv and... | |||
Owner
There was a problem hiding this comment.
Excellently commented code! Could use more frequent/useful commit messages.
mdoellma
reviewed
Oct 6, 2017
|
|
||
| #Usage: bash gender.sh <filenameforoutput> | ||
| echo 'Unique gender and yearsexperience cominations saved to' $1 | ||
| cat wages.csv | sed '1d'| cut -d, -f-1,2 | sort -ut"," -k1,1 -k2n,2 > "$1" |
mdoellma
reviewed
Oct 6, 2017
| echo 'lowest earner:' | ||
| cat wages.csv | grep -v gender | sed 'y/,/ /' | sort -k 4 -n -r | tail -n 1 | ||
| echo 'number of females in the top 10 wage earners:' | ||
| cat wages.csv | grep -v gender | sed 'y/,/ /' | sort -k 4 -n -r | head -n 10 | grep female | wc -l |
Owner
There was a problem hiding this comment.
Correct, but if you read the directions carefully, you should have deleted the years schooling column from the returned responses.
mdoellma
reviewed
Oct 6, 2017
| echo 'number of females in the top 10 wage earners:' | ||
| cat wages.csv | grep -v gender | sed 'y/,/ /' | sort -k 4 -n -r | head -n 10 | grep female | wc -l | ||
|
|
||
| #demonstrates the effect of graduating college on minimum wage |
Owner
There was a problem hiding this comment.
Kudos for the use of awk! If you read directions carefully, you should have returned minimum, not average wage, but OK.
Should have reported the difference with echo "$val2 - $val1" | bc, after saving college and high school wages to val1 and val2.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connor_Shirley Submission