I am looking to remove all text after the 4 digit year of movie files:
Input:
Some.Movie.Name.2011.1080p.BluRay.x265.mp4
Another.Movie.Name.1999.1080p.BluRay.x264.mp4
Another.Movie.Name.II.2001.1080p.BluRay.x264.mp4
Desired Output:
Some.Movie.Name.2011
Another.Movie.Name.1999
Another.Movie.Name.II.2001
I have used awk with regex:
echo "Some.Movie.Name.2011.1080p.BluRay.x265.mp4" |awk -F'.[0-9]{4}' '{print$1}'
Which gives me:
Some.Movie.Name
I can't find a way with awk or anything else to have it print the 4 digit year delimiter also.