Syntax error with if statement and if statement
1 answer
awk does not support bitwise operators. However, if you have gawk (GNU awk), you can do:
gawk '{ if (and($2,0x40) != 0) print $1; }' $file
Note that I removed the empty else clause and the unnecessary one cat
.
See the manual for other bitwise operators and usage in gawk.
+4
source to share