[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Decimal point or decimal comma
From: |
Pierre Gaston |
Subject: |
Re: Decimal point or decimal comma |
Date: |
Mon, 10 Aug 2009 11:30:28 +0300 |
On Mon, Aug 10, 2009 at 9:42 AM, Paul Jarc<address@hidden> wrote:
> Aharon Robbins <address@hidden> wrote:
>> See the --use-lc-numeric option which will give you what you want.
>>
>> You will have to use a shell script to invoke gawk with this option, since
>> it can't be combined on a #! line.
>
> But you can combine the shell and gawk scripts into one file:
> #!/bin/sh
> "eval" "exec gawk --use-lc-numeric -f \"$0\" ${1+\"address@hidden"}" && 0
> ... gawk code, which the shell won't see ...
Take care that there are 2 "problems" with this approach:
1) $0 might not be usable depending on the shell or on how the script
is used. see http://mywiki.wooledge.org/BashFAQ/028
2) eval can also be dangerous used like this, as it permits to pass
arbitrary code
that will be executed by the script (ie pass '$(rm -rf )' as an
argument to the script
and things like this) see http://mywiki.wooledge.org/BashFAQ/048
Re: Decimal point or decimal comma, Göran Uddeborg, 2009/08/11