I'm trying to understand the difference of single and double quotes in these particular situations:
egrep '^Za(za)+!$' *
returns Zaza!
and Zazazazaza!
(Which is what I want)
egrep "^Za(za)+!$" *
returns the ones I mentioned above but also Zaaazazaaaa!
, Zaza
, Zazaza!Zazaza!
, Za!
From my understanding, double quotes take the meanings of the symbols like +
into account, so why would the double quotes not work?