say
say

Reputation: 2655

How do I escape the following command in mac terminal?

How do I get this command working in the command line?

grep "<!--#include  file="../../includes/" *.*

I know I can escape the "/" by doing "/" but I get problems with the "!--" and the " after file.

Upvotes: 1

Views: 5071

Answers (2)

amit_g
amit_g

Reputation: 31260

Use single quotes for string literals in command line when you don't want the parameter expansion.

grep '<!--#include  file="../../includes/' *.*

Upvotes: 2

vmpstr
vmpstr

Reputation: 5211

Try putting the pattern in single quotes. If you also want to make sure the string is treated as a literal, try with -F

Upvotes: 2

Related Questions