bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] gawk gives "fatal: division by zero attempted" when invok


From: Aharon Robbins
Subject: Re: [bug-gawk] gawk gives "fatal: division by zero attempted" when invoked on a she-bang line with -F
Date: Tue, 07 Feb 2012 22:30:10 +0200
User-agent: Heirloom mailx 12.4 7/29/08

Hi. Re this:

> Date: Thu, 02 Feb 2012 19:32:12 -0800
> From: Seungbeom Kim <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] gawk gives "fatal: division by zero attempted" when
>  invoked on a she-bang line with -F
>
> 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

On every system I know, you can only provide one command line argument
(option) in a #! line.  Thus you need to use

        #! /usr/bin/awk --exec
        BEGIN { FS = ":" }
        # rest of your script here

Thanks,

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]