Subject: one-liner smart Perl command instead of a simple grep (in Bash script)
I have a problem when I use grep to match the unusual characters (I can\'t put the \"\\\"
You will have to escape the string somehow. Using \
to escape special characters is required in this case, because passing the string to Perl is really no different than passing it to grep -- both will see the string after the shell processes it.
Using Perl to do this will simply obfuscate your code.