Love-Stephens submission#5
Open
JaniceLove wants to merge 20 commits into
Open
Conversation
…ars of school and print to stdout
… years of schooling
mdoellma
reviewed
Oct 6, 2017
| @@ -0,0 +1,3 @@ | |||
| # Intro_Biocomp_ND_318_Tutorial4 | |||
Owner
There was a problem hiding this comment.
Good job committing often with useful commit messages.
mdoellma
reviewed
Oct 6, 2017
| @@ -0,0 +1,24 @@ | |||
| #Authors: Melissa Stephens, Janice Love | |||
mdoellma
reviewed
Oct 6, 2017
|
|
||
| cat "$@" |cut -d ',' -f 1,2 | sort -u | tr ',' ' ' > temp.txt | ||
| cat temp.txt | sort -k1.1d,1 -k2.2n,2 > challenge1.txt | ||
|
|
Owner
There was a problem hiding this comment.
correct, could grep out gender to remove column headings from middle of file
mdoellma
reviewed
Oct 6, 2017
|
|
||
| for column in wages.csv; do echo "highest earner in $column:"; cat wages.csv | tr ',' ' ' | cut -d "," -f 1,2,4 | sort -k 4,4rn | head -n 1; | ||
| echo "lowest earner in $column:"; cat wages.csv | grep 'male' | tr ',' ' ' | cut -d "," -f 1,2,4 | sort -k 4,4rn | tail -n 1; | ||
| echo "number of females in top 10 earners:" ; cat wages.csv | tr ',' ' ' | sort -k 4,4n | head -n 10 | grep 'female' | wc -l; done |
Owner
There was a problem hiding this comment.
Close, but these are the lowest wage earners. Either use tail or sort in reverse order (-r).
For the differences in wages below, question asked for minimum, average OK. Nice use of awk! Please read question carefully. Stuart wanted you to print the difference to standard out.
-0.25 pts
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.
No description provided.