I created a .csv file (separated by ; instead of ,) that includes movie titles, movie rankings, movie years, and imdb rating from http://www.imdb.com/chart/top. Now I am trying to figure out how many movies were released before a given year. The year will be determined by the first shell input argument. Here is what I have so far:
awk -F "\"*;\"*" '$4 < 1950 {print ;}' result.csv | more | wc -l
Instead of "1950", I need it to be the first shell argument ($1). Using $1 instead of 1950 is telling the machine to compare the 4th column to the 1st column. I need to compare the 4th column with the 1st argument.
I need to run the file with the 1st argument being 1950:
./filename.sh 1950