[ale] sed head scratcher
Dennis Ruzeski
denniruz at gmail.com
Tue Aug 4 15:35:52 EDT 2009
Perhaps 'cool things you can do with awk' would make a good meeting topic.
Combined with some advanced regular expression stuff and you've got some
serious time savers there.
--Dennis
On Tue, Aug 4, 2009 at 3:18 PM, Jim Kinney <jim.kinney at gmail.com> wrote:
> 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
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20090804/60d20702/attachment.html
More information about the Ale
mailing list