Skip to content

Drummond - Brooke Chambers submission#3

Open
beedrummond wants to merge 13 commits into
mdoellma:masterfrom
beedrummond:master
Open

Drummond - Brooke Chambers submission#3
beedrummond wants to merge 13 commits into
mdoellma:masterfrom
beedrummond:master

Conversation

@beedrummond

Copy link
Copy Markdown

No description provided.

Comment thread challenge1.sh
@@ -0,0 +1,2 @@
cat "$1" | tr "," " " | cut -d " " -f 1,2| sort -k 1 > sort1.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.

Code could use usage comments and other descriptive comments.

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 have used grep to remove column headers.

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.

3/3

Comment thread question2.sh

echo number of females in the top 10 earners
cat "$1" | tr "," " " | sort -k4n | tail -10 | grep "female" | wc -l

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!

Comment thread question3.sh

echo high school grad minimum wage
val2= cat "$1" | tr "," " " | cut -d" " -f3,4 | grep "12 " | sort -k2n | head -1 | cut -d" " -f2

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, but asked for the difference with echo "$val2 - $val1" | bc.

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