I’m very new to bash so I apologize if this is a dumb question.
I’m trying to write a script that takes a file and tests to see if it ends in html. Here is my code:
echo tester.html | grep -E '[^ ]*[.html]'
Yet it echos every input I give it, how do I fix it?
or in bash
&&&||boolean syntax is a shorcut forif condition; then something; else something_else; fi, see http://mywiki.wooledge.org/BashGuide/TestsAndConditionalsNOTE
– using
[]in a regex means character class (a set of characters)