I'd like to use grep
with a PCRE expression that contains the <
character. Bash thinks I want to redirect, but I don't want to. How can I escape <
?
Shell – How to escape < or > in a parameter in shell
escape-charactersparameterquotingshell
escape-charactersparameterquotingshell
I'd like to use grep
with a PCRE expression that contains the <
character. Bash thinks I want to redirect, but I don't want to. How can I escape <
?
Best Answer
I was able to do it with a backslash:
A quoted less-than, and a quoted, backslashed less than both gave goofy answers.