Suppose I have an abc.txt file that contains the string ab*cd . When I grep this ab*cd pattern with quotes, but without asterisk escaping, it does not work:
> grep ab * c abc.txt
> grep "ab * c" abc.txt
> grep 'ab * c' abc.txt
When I use both quotes and run away, it works
> grep "ab \ * c" abc.txt
ab * cd
> grep 'ab \ * c' abc.txt
ab * cd
Now I wonder why the quotes do not work, and if I can only use quotes without escaping the asterisk.
source share