Skip to content

Love-Stephens submission#5

Open
JaniceLove wants to merge 20 commits into
mdoellma:masterfrom
JaniceLove:master
Open

Love-Stephens submission#5
JaniceLove wants to merge 20 commits into
mdoellma:masterfrom
JaniceLove:master

Conversation

@JaniceLove

Copy link
Copy Markdown

No description provided.

Comment thread README.md
@@ -0,0 +1,3 @@
# Intro_Biocomp_ND_318_Tutorial4

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job committing often with useful commit messages.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.75/3

Comment thread genderYrExp.sh
@@ -0,0 +1,24 @@
#Authors: Melissa Stephens, Janice Love

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nicely commented!

Comment thread genderYrExp.sh

cat "$@" |cut -d ',' -f 1,2 | sort -u | tr ',' ' ' > temp.txt
cat temp.txt | sort -k1.1d,1 -k2.2n,2 > challenge1.txt

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, could grep out gender to remove column headings from middle of file

Comment thread genderYrExp.sh

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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants