If conditions in awk

view full story

http://www.unix.com – Hello Friends, I need to find some CDRs in production servers whose 1st field value and 2nd field value = 1 and 11th looks like 45.123... where there are more than 3 digits after comma.so i wrote a one liner, something like below but does not work, however when i used first and second conditions it worked: Code: for file in `find . -type f -name "*.txt" -mtime -30 2>/dev/null`; do nawk -F\| '{if (($1==1) && ($2==1) && ($11~[0-9]*\.[0-9][0-9][0-9]*)) print $0}' $file; done Code: nawk: syntax error at source line 1  context is       & (HowTos)