[ale] sed head scratcher

Richard Bronosky Richard at Bronosky.com
Tue Aug 4 15:10:12 EDT 2009


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 }'


More information about the Ale mailing list