Your error is due to a missing closing brace (}) on line ending with x=1
The ternary operator is a simple shorthand for if/else structure:
The above is evaluated like so:
if x is true (in our case any number not 0) return the item after the '?' (here that is "\n" - a newline)
if x is false (in our case when it equals 0) return the item after ':' (here that is "" - nothing)
As you can see from above, setting x to 2 or any other number will not alter how it works. All numbers that are not 0 will return the newline character
Not sure if you have the manual bookmarked (but you should) -
http://www.gnu.org/software/gawk/man...ode/index.html
Let us know if we can help further