I need to egrep a string that isn\'t known before runtime and that I\'ll get via shell variable (shell is bash, if that matters). Problem is, that string will c
egrep
Use the -F flag to make the PATTERN a fixed literal string
-F
$ var="(.*+[a-z]){3}" $ echo 'foo bar (.*+[a-z]){3} baz' | grep -F "$var" -o (.*+[a-z]){3}