bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] 0 is invalid as number of arguments for tolower


From: Aharon Robbins
Subject: Re: [bug-gawk] 0 is invalid as number of arguments for tolower
Date: Wed, 14 Oct 2015 05:53:28 +0300
User-agent: Heirloom mailx 12.5 6/20/10

Hi.

> 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?

Totally correct.

> awk 'gsub(/ (LE|LA|LES|ET|DU) /, tolower(&))'

To do this you'll have to do it manually, but splitting the line
apart around the match, lowering the bit of interest, and putting
it back together.  You can probably put together a function
that will do this for you.

Thanks,

Arnold



reply via email to

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