In article <
201406041...@kylheku.com>,
Kaz Kylheku <
k...@kylheku.com> wrote:
...
>TXR (Solaris 10 x86 binary of Version 89 now available!)
>
>
http://www.nongnu.org/txr
>
>Very simple:
>
>@(bind timestamp-set @(hash :equal-based))
>@(repeat)
>@f1.@f2.@f3.@{timestamp /.+/}
>@(do (sethash timestamp-set (list f1 f2 f3) t))
>@(end)
>@(next)
>@(repeat)
>@f1.@f2.@f3.@timestamp
>@(do (put-line `@f1.@f2.@f3@(if (inhash timestamp-set (list f1 f2 f3))
> `.@timestamp` "")`))
>@(end)
>
>$ txr timestamp.txr file1 file2
>US60001.file1_rpt.d06042014.20140604231856
>US70001.file2_rpt.d06042014.20140604231832
>US80001.file3_rpt.d06042014
>US90001.file4_rpt.d06042014.20140604231856
>US80001.file3_rpt.d06042014
Yaknow...
If the goal is to get the OPs thinking - getting them to solve the problem
on their own - then I think posting solutions in TXR (or other, let's be
nice and say, non-mainstream, languages) is a good idea. Better than spoon
feeding them a solution in, say, AWK or shell - as is the usual norm in
these groups.
Somewhat related to the above, I often (intentionally) post solutions which
are, shall we say, about 3/4ths right. The idea is to leave a little for
the reader to work out on his own. Then, of course, I get slagged by the
other regs for not giving a full, complete, spoon-feed answer.
So, I say, keep the TXR solutions coming...
--
There are many self-professed Christians who seem to think that because
they believe in Jesus' sacrifice they can reject Jesus' teachings about
how we should treat others. In this country, they show that they reject
Jesus' teachings by voting for Republicans.