I have a data set that looks like the following:
movie (year) genre
for example.
some words (1934) action
My goal is to grab each "movie" field and then check a different file that also has a bunch of movies and delete the lines from the second file that do not contain the movie. I have been trying to use awk to do this, but have only been able to match the year field. Is there a way that I can create a variable for the movie field? I feel like the easiest way to do this would be to match the year field and create a variable from everything that comes before it in each line. I have not been able to figure this out, is there some way to do this that might be easier than my suggestion?