-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guinness-neelay-mitchell submission #8
Open
aaguinness
wants to merge
15
commits into
lyy005:master
Choose a base branch
from
aaguinness:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f976d9e
fav3movies
oneelay 50b7d53
Thomas added three movies to the text file.
twhmitchell 9cc11f7
update movies
aaguinness 94da54c
ranked list added
aaguinness 6507627
Challenge part 1
aaguinness de2e2e9
OM Changes
oneelay 791d3d2
OM and THOMAS challenge question2
oneelay 11214ba
adding shell script woops
aaguinness e7dd934
Merge branch 'master' of https://github.com/aaguinness/Intro_Biocom_N…
aaguinness 9b3eba0
adding shell woops
aaguinness 26275da
combined into a single shell script
aaguinness af2d782
Start of challenge 3
oneelay 7fa43f3
Merge branch 'master' of https://github.com/aaguinness/Intro_Biocom_N…
oneelay 4afbaae
added in part 1 of part 3
oneelay c347f89
FINAL
oneelay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
|
||
### BELOW THIS IS WHAT OM & THOMAS DID FOR CHALLENGE 2 | ||
for file in *.csv | ||
do | ||
|
||
val1=cat $file |grep "m" |cut -d "," -f 3,4 | grep "12," | cut -d "," -f 2 | tr "\n" " " | perl -ne 'use List::Util qw(sum); @arr = split(" ", $_); print sum(@arr)/@arr."\n"' | ||
val2=cat $file |grep "m" |cut -d "," -f 3,4 | grep "16," | cut -d "," -f 2 | tr "\n" " " | perl -ne 'use List::Util qw(sum); @arr = split(" ", $_); print sum(@arr)/@arr."\n"' | ||
echo "Highest Earner:" | ||
cat $file | head -n1 | ||
cat $file |grep "m"|sort -k4 -n -t, -r| head -n1 | ||
|
||
echo "Lowest Earner:" | ||
cat $file | head -n1 | ||
cat $file |grep "m"|sort -k4 -n -t, -r| tail -n1 | ||
|
||
|
||
echo "Number of Females in Top-10 Earners:" | ||
cat $file |grep "m"|sort -k4 -n -t, -r|head -n10 | grep "female" | wc -l | ||
|
||
echo "Difference in wages between 12 and 16 year degree:" | ||
echo "$val2 - $val1" | bc | ||
done |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
tail -n +2 wages.csv | sort -k1,1 -k2,2n -t , -u | cut -d , -f1,2 | sed 's/,/ /g' > genyears.txt | ||
|
||
|
||
### BELOW THIS IS WHAT OM & THOMAS DID FOR CHALLENGE 2 | ||
for file in *.csv | ||
do | ||
val1=`cat $file |grep "m" |cut -d "," -f 3,4 | grep "12," | cut -d "," -f 2 | tr "\n" " " | perl -ne 'use List::Util qw(sum); @arr = split(" ", $_); print sum(@arr)/@arr."\n"'` | ||
val2=`cat $file |grep "m" |cut -d "," -f 3,4 | grep "16," | cut -d "," -f 2 | tr "\n" " " | perl -ne 'use List::Util qw(sum); @arr = split(" ", $_); print sum(@arr)/@arr."\n"'` | ||
|
||
echo "Highest Earner:" | ||
cat $file | head -n1 | ||
cat $file |grep "m"|sort -k4 -n -t, -r| head -n1 | ||
|
||
echo "Lowest Earner:" | ||
cat $file | head -n1 | ||
cat $file |grep "m"|sort -k4 -n -t, -r| tail -n1 | ||
|
||
|
||
echo "Number of Females in Top-10 Earners:" | ||
cat $file |grep "m"|sort -k4 -n -t, -r|head -n10 | grep "female" | wc -l | ||
|
||
echo "Difference in wages between 12 and 16 year degree:" | ||
echo "($val2) - ($val1)" | bc | ||
done | ||
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
1. Back To The Future | ||
2. The Godfather | ||
3. Rebel One | ||
4. Star Wars | ||
5. Citizen Kane | ||
6. The Dark Knight | ||
7. Rebel One | ||
8. Mothra | ||
9. Cloud Atlas |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
female 1 | ||
female 2 | ||
female 3 | ||
female 4 | ||
female 5 | ||
female 6 | ||
female 7 | ||
female 8 | ||
female 9 | ||
female 10 | ||
female 11 | ||
female 12 | ||
female 13 | ||
female 14 | ||
female 15 | ||
female 16 | ||
male 2 | ||
male 3 | ||
male 4 | ||
male 5 | ||
male 6 | ||
male 7 | ||
male 8 | ||
male 9 | ||
male 10 | ||
male 11 | ||
male 12 | ||
male 13 | ||
male 14 | ||
male 15 | ||
male 16 | ||
male 17 | ||
male 18 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tail -n +2 wages.csv | sort -k1,1 -k2,2n -t , -u | cut -d , -f1,2 | sed 's/,/ /g' > genyears.txt |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job