[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] 0 is invalid as number of arguments for tolower
From: |
Hermann Peifer |
Subject: |
[bug-gawk] 0 is invalid as number of arguments for tolower |
Date: |
Sun, 11 Oct 2015 20:16:04 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Hi again,
I assume I am simply to naïve in assuming that the below would ever
work. gsub() knows what `&' is about, but tolower() doesn't and will
never learn, so this is a feature (and shouldn't be sent to bug-gawk in
the first place ;-), correct?
Hermann
$ echo "LA SOMME, LA MANCHE, LE RHIN ET LA MER DU NORD" |
awk 'gsub(/ (LE|LA|LES|ET|DU) /, tolower(&))'
awk: cmd. line:1: gsub(/ (LE|LA|LES|ET|DU) /, tolower(&))
awk: cmd. line:1: ^ syntax error
awk: cmd. line:1: gsub(/ (LE|LA|LES|ET|DU) /, tolower(&))
awk: cmd. line:1: ^ 0 is invalid as
number of arguments for tolower
- [bug-gawk] 0 is invalid as number of arguments for tolower,
Hermann Peifer <=