syntax error The source line is 1.
The error context is
{if >>> ($7=="Aug <<<
awk: The statement cannot be correctly parsed.
The source line is 1.
awk: There is a missing } character.
awk: There is a missing ) character.
Some old awk implementations don't support the -v var... syntax:
bash-3.00$ awk -v x=1 '{ print x }' <<< a
awk: syntax error near line 1
awk: bailing out near line 1
bash-3.00$ awk '{ print x }' x=1 <<< a
1
bash-3.00$ type awk; uname -sr
awk is hashed (/usr/bin/awk)
SunOS 5.10
You should use either nawk or the X/Open version of awk (/usr/xpg4/bin/awk) on Solaris anyway.
When you're using the syntax below, the value(s) is/are not available in the BEGIN block:
bash-3.00$ awk 'BEGIN { print x }' x=1 <<< a
bash-3.00$ /usr/xpg4/bin/awk 'BEGIN { print x }' x=1
bash-3.00$ nawk 'BEGIN { print x }' x=1
bash-3.00$
@Corona688: I do not disagree, I only correct the error of the single quote on the syntax of the example.
But, it is true that I have also fixed the method.:o