Unix Command line assistance

I need to use the command prompt to get the movies that were made after 1980 (that is, ’year’ column has a number greater than 1980). Hint: apply a pattern to see if number is ”198[…]” or a larger number. Cannot use awk for this assignment.

file imdv.csv

$ cat clean-imdb.csv | head -5 Title,title trim,Year,Rank,Rank (desc),Rating,New in 2011 from 2010?,2010 rank,Rank Difference, Sherlock Jr. (1924),SherlockJr.(1924),1924,221,30,8,y,n/a,n/a, The Passion of Joan of Arc (1928),ThePassionofJoanofArc(1928),1928,212,39,8,y,n/a,n/a, His Girl Friday (1940),HisGirlFriday(1940),1940,250,1,8,y,n/a,n/a, Tokyo Story (1953),TokyoStory(1953),1953,248,3,8,y,n/a,n/a,

1 Like

Hi @hashtagkehl,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our community organized so users can more easily find information.

As you’ll notice, your topic is now here in the Project Development Help and Advice board. No action is needed on your part; you can continue the conversation as normal here.

Cheers!

1 Like

You’re going to need a regular expression that can determine if a movie is made after 1980.

I think something like:

(2\d{3}|199\d|198[1-9])

would probably work, keeping only the movies from, respectively, 2000+, 1990 - 1999, and then 1981  -  1989.

1 Like