Skip to content
4 changes: 4 additions & 0 deletions ExerciseScript4.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
#This script will sort wages.csv by gender and years of experience
#./ExerciseScript4.1
sed 's/,/ /g' wages.csv | sort -k1,1 -k2,2n | cut -d' ' -f1,2 | uniq > uniquegenderexperience.txt
8 changes: 8 additions & 0 deletions ExerciseScript4.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# This script will execute the gender, yearsExperience, and wage for the highest and lowest earners in the data

cat wages.csv | cut -d ',' -f 1,2,4 | sed 's/,/ /g' | sort -k3,3n | sed 1d | (head -n1 && tail -n1) > HighLow.txt

# This script will return the number of females in the top ten earners in this data set

cat wages.csv | cut -d ',' -f 1,2,4 | sed 's/,/ /g' | sort -k3,3n | tail -n10| grep "female" | wc -l > TopEarningWomen.txt
6 changes: 6 additions & 0 deletions ExerciseScript4.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
#This will hopefully work

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.

Probably an accidental comment? But you would not want something like this in a final pull request.

#./ExerciseScript4.3
val1="$(grep ",16," wages.csv | sed 's/,/ /g' | sort -k3 -n -r | head -n 16 | sort -k4 -n | head -1 | cut -d" " -f4)"
val2="$(grep ",12," wages.csv | sed 's/,/ /g' | sort -k3 -n -r | head -n 1188 | sort -k4 -n | head -1 | cut -d" " -f4)"
echo "$val1 - $val2" | bc
6 changes: 6 additions & 0 deletions KO_Fave_Movies
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Star Wars
Harry Potter
Lord of the Rings
Avengers
Hidden Figures
Matilda