Re: [OT] how to change the first character into upper case
On Wed, Feb 22, 2012 at 12:38 AM, Tony van der Hoff <tony@vanderhoff.org> wrote:
> On 21/02/12 15:48, lina wrote:
>>
>> Sorry a bit off-topic, but I am stuck with how to tr
>> (googled some ways out, still not work)
>>
>> NELSON ARISPE, EDUARDO ROJAS, AND HARVEY B. POLLARD
>>
>> into
>>
>> Nelson Arispe, Eduardo Rojas, and Harvey B. Pollard
>>
>> Here is what I came up with so far:
>>
>> echo "NELSON ARISPE, EDUARDO ROJAS, AND HARVEY B. POLLARD" | sed
>> 's/\([A-Z]\)\([A-Z]+\)/\1\L\2/g'
>>
>> not work.
>>
>> Thanks with best regards,
>>
>>
> Coursework, Lina? You were nearly there :)
Ha ... not coursework.
>
> The "+" form for one or more characters is not supported by sed. This works
> :
> sed 's/\([A-Z]\)\([A-Z]*\)/\1\L\2/g'
>
> You can sort out the problem with AND for yourself!
Thanks Tony,
Best regards,
>
> --
> Tony van der Hoff | mailto:tony@vanderhoff.org
> Buckinghamshire, England |
>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject
> of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 4F43C88A.8080009@vanderhoff.org">http://lists.debian.org/[🔎] 4F43C88A.8080009@vanderhoff.org
>
Reply to: