wiedehopf / adsb-scripts

Solutions to common problems for rtl_sdr / ADS-B stuff
MIT License
291 stars 36 forks source link

awk syntax error #17

Closed upD8R closed 2 years ago

upD8R commented 2 years ago

Hi there,

just setting up a new RPi with your very cool scripts but after installing autogain1090 I get an awk syntax error (the "basic" stuff works as expected as far as I can tell):

pi@flight:~ $ sudo autogain1090
awk: line 1: syntax error at or near }
awk: line 1: syntax error at or near }
No gain change needed, percentage of messages >-3dB is in nominal range. (0,968%)

Any idea?

wiedehopf commented 2 years ago

does it persist or was it only happening on first run?

wiedehopf commented 2 years ago

Run the install again, see if the error is gone.

upD8R commented 2 years ago

It persists, also after 2nd installation.

Looks like a variable is not (yet) populated? But I don't know, which awk is throwing this error.

wiedehopf commented 2 years ago

Edit /usr/local/bin/autogain1090 and add a set -x at the start of the script.

upD8R commented 2 years ago

Something "," vs "."?

+ awk 'BEGIN{ exit (0,000 > 0.5) }'
awk: line 1: syntax error at or near }
+ awk 'BEGIN{ exit (0,000 < 7.0) }'
awk: line 1: syntax error at or near }
wiedehopf commented 2 years ago

Yeah it's your locale .... i really don't know why awk depends on locale it's very annoying.

Ok ... try another install, should be fixed.

upD8R commented 2 years ago

Many thanks, by Googling I was also ending up at my locale ;-)

It is fixed now, thanks indeed for your outstanding support!