I want to use regular expressions in an awk script to match symbols like ^, and perform certain operations when they match within an if statement.
However, I have tried increasing the number of backslashes in MARK="\^" or using MARK="^", but I still can't get a match.
Are there any other possible causes to consider?
MARK="^"
awk ~~~
if (mark ~ "['$MARK}']+") {
print $1;
}
I tried to escape it with a backslash and expected it to match.