[ale] sed head scratcher

Jim Kinney jim.kinney at gmail.com
Tue Aug 4 15:18:30 EDT 2009


slick. very slick, indeed. That is an excellent solution. I did not
know about substitutions like that using awk.

On Tue, Aug 4, 2009 at 3:10 PM, Richard Bronosky<Richard at bronosky.com> wrote:
> That's pretty good. However, you are possibly altering the field
> separator (replacing spaces with tabs) and certainly loosing any
> fields greater than 3. This version changes field 2 and only field 2.
>
> cat /etc/hosts | awk '{$2=tolower($2); print}'
>
> --
> .!# RichardBronosky #!.
>
> On Tue, Aug 4, 2009 at 2:16 PM, Al Snow<jasnow at hotmail.com> wrote:
>> cat /etc/hosts | awk '{ print $1, tolower($2), $3 }'
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
>



-- 
-- 
James P. Kinney III
Actively in pursuit of Life, Liberty and Happiness


More information about the Ale mailing list