Home > Back-end >  Why when using parenthesis with the egrep command in terminal I get the error: -bash: syntax error n
Why when using parenthesis with the egrep command in terminal I get the error: -bash: syntax error n

Time:01-27

for example when typing the following command in terminal

egrep (cs)*449 hi.txt

gives the result

-bash: syntax error near unexpected token `cs'

CodePudding user response:

Maybe you can add double quote like this:

egrep "(cs)*449" hi.txt

I hope it's help for you

  • Related