[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] gawk gives "fatal: division by zero attempted" when invoked o
From: |
Seungbeom Kim |
Subject: |
[bug-gawk] gawk gives "fatal: division by zero attempted" when invoked on a she-bang line with -F |
Date: |
Thu, 02 Feb 2012 19:32:12 -0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:10.0) Gecko/20120129 Thunderbird/10.0 |
Hello,
I found that gawk gives "fatal: division by zero attempted"
when invoked on a she-bang line of a script with an -F option,
regardless of what the script tries to do.
$ /usr/bin/awk --version
GNU Awk 3.1.8
Copyright (C) 1989, 1991-2010 Free Software Foundation.
...
$ cat bin/test-awk # a minimal example; does nothing
#!/usr/bin/awk -F: --exec
$ echo "1:2" | bin/test-awk # error
awk: (FILENAME=- FNR=1) fatal: division by zero attempted
$ echo "1:2" | LC_ALL=C bin/test-awk # error
awk: (FILENAME=- FNR=1) fatal: division by zero attempted
$ echo "1:2" | /usr/bin/awk -F: --exec bin/test-awk # no error
It was tested on Ubuntu 11.10.
Can you confirm and fix this error, please?
Thank you,
--
Seungbeom Kim
- [bug-gawk] gawk gives "fatal: division by zero attempted" when invoked on a she-bang line with -F,
Seungbeom Kim <=