I’ve got a program that sends text to stdout. But I only want to keep those lines where the fifth column isn’t ‘*’. That is the asterisk char, not the regex expression that catches everything. I can’t seem to use escape for this, I’ve tried
./a.out |awk '$5!=* {print}'
awk: $5!=* {print}
awk: ^ syntax error
./a.out |awk '$5!=\* {print}'
awk: $5!=\* {print}
awk: ^ backslash not last character on line
Awk is of course not a requirement, but I thought this would be the simplest.
Thanks
awkis similar to most Algol/C-family languages; literal strings require string quotes.