A string variable taking any kind of string has a value "yjava_jboss.log4j_file_appender_pattern_layout='%d .//- %x %-5p [%c] %m%n' " at some point of time during execution. It is to greped on a file that contains with value. I used
grep "$STR" <filename> ,where STR during execution takes value as shown above. But it dint work.. I noticed that the problem is with th [ and ] meta characters
How do we escape characters when we dont even know what character is it and where is it present.???
I need the solution in shell programming.