Skip to content
Advertisement

How to Grep for special characters in Linux

I wanna grep this $_SESSION[“sig”] in Linux, and find out all of files with this variable. I used

grep -F "$_SESSION["sig"]" *
fgrep "$_SESSION["sig"]" *
fgrep "$_SESSION["sig"]" *

but they are not working

How can I fix this? Thank you.

Advertisement

Answer

Just use the grep -F '$_SESSION["sig"]' * command.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement