alexanderepstein / Bash-Snippets

A collection of small bash scripts for heavy terminal users
MIT License
9.64k stars 842 forks source link

The file extension .png will be added only if the file has extensions other than .png or .PNG #150

Closed aadityanaik closed 6 years ago

aadityanaik commented 6 years ago

Pull Request Label:

Pull Request Checklist:


Used grep to identify if the user input of the file includes the .png or .PNG extensions... If it does not, it appends .png to the file name

alexanderepstein commented 6 years ago

Looks good to me, any reason you threw the -q flag onto grep, if it works it work just wanting to know for the sake of my own curiosity lol thanks for the contribution :+1:

aadityanaik commented 6 years ago

Mostly because whenever the pattern matching would succeed, it would print the filename out. I added the -q to suppress that.