From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Tue, 2 Sep 2014 13:02:49 -0400 To: 9fans@9fans.net Message-ID: In-Reply-To: <02adc2378671d0fb6129e699821979e0@quintile.net> References: <02adc2378671d0fb6129e699821979e0@quintile.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] silly question Topicbox-Message-UUID: 14a8a840-ead9-11e9-9d60-3106f5b1d025 On Tue Sep 2 03:07:56 EDT 2014, steve@quintile.net wrote: > I want to process some dated logfiles in awk. > > gawk has date, strftime and mktime but Brian's does not. i'm not sure what your particular problem domain is since you don't say, but i've always just used the standard awk functions to convert dates. with string manipulation, regular expressions, and associative arrays, i have not found a date conversion issue that awk can't handle. this has the advantage that a second awk isn't introduced to the system, with all the resulting incompatibilites, and not requiring porting something from linux. the operations that strftime the unix fn provides are implementable directly in awk. speaking as one who has fallen into this trap, i think this might be an example of negative pattern, too. it's easy to get hung up on missing specialized function, when in fact the task at hand doesn't really need it. stand up and shout if you remember the days when packages would often fail to compile because they were looking for a function that wasn't really necessary, and the test for that function failed in some unexpected way. i wish i could remember some of the examples. they were spectacular. and not in a good way. - erik