I am currently trying to a make a script that would grep input to see if something is of a certain file type (zip for instance), although the text before the file type could be anything, so for instance
something.zip
this.zip
that.zip
would all fall under the category. I am trying to grep for these using a wildcard, and so far I have tried this
grep ".*.zip"
But whenever I do that, it will find the .zip
files just fine, but it will still display output if there are additional characters after the .zip
so for instance .zippppppp
or .zipdsjdskjc
would still be picked up by grep. Having said that, what should I do to prevent grep from displaying matches that have additional characters after the .zip
?