[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



    Christopher> Guys - I have another seemingly trivial question that
    Christopher> I can't seem to figure out.  Does anyone have a
    Christopher> one-liner that can convert a line like this:

    Christopher> 'ab_ba_ab_ba','mfljwis at yahoo.com','12/15/2001'

    Christopher> into a line like this:

    Christopher> 'ab_ba_ab_ba','mfljwis at yahoo.com','1008392400'


Presuming the last field's the only thing that looks dateish:

perl -MTime::Local -pe 's{(?:(\d{1,2})/(\d{1,2})/(\d{4}))}{timelocal((0)x3,$2,$1-1,$3)}e'


-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org|  Vincent, you should cease askin'          \ o.O'
                      |  scary questions." -- Jules                =(___)=
                      |                                               U


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00009" href="msg00009.html">[ale] Anyone having problems with comcast now?</a></strong>
<ul><li><em>From:</em> mdhirsch at gmail.com (Michael Hirsch)</li></ul></li>
<li><strong><a name="00011" href="msg00011.html">[ale] Re: Anyone having problems with comcast now?</a></strong>
<ul><li><em>From:</em> mdhirsch at gmail.com (Michael Hirsch)</li></ul></li>
<li><strong><a name="00019" href="msg00019.html">[ale] Re: Anyone having problems with comcast now?</a></strong>
<ul><li><em>From:</em> mdhirsch at gmail.com (Michael Hirsch)</li></ul></li>
<li><strong><a name="00033" href="msg00033.html">[ale] Re: Anyone having problems with comcast now?</a></strong>
<ul><li><em>From:</em> rramsdell at adelphia.net (Randy Ramsdell)</li></ul></li>
<li><strong><a name="00035" href="msg00035.html">[ale] Re: Anyone having problems with comcast now?</a></strong>
<ul><li><em>From:</em> adrin at bellsouth.net (H. A. Story)</li></ul></li>
<li><strong><a name="00097" href="msg00097.html">[ale] Re: Anyone having problems with comcast now?</a></strong>
<ul><li><em>From:</em> mdhirsch at gmail.com (Michael Hirsch)</li></ul></li>
<li><strong><a name="00115" href="msg00115.html">[ale] awk question</a></strong>
<ul><li><em>From:</em> christopher at bergeron.com (Christopher Bergeron)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00117.html">[ale] awk question</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00119.html">REsolved: [ale] Q: Enabling VNC into Fedora-C3</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00117.html">[ale] awk question</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00091.html">[ale] Anyone having problems with comcast now?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00118"><strong>Date</strong></a></li>
<li><a href="threads.html#00118"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>