Suppose I get the following result after doing a
/home/John/logs/2013-07-10.171222-0400EDT.html:I have emailed Mark. Thanks
I want to extract the date from this so that my output looks like -
2013-07-10:I have emailed Mark. Thanks
How can I do this using any one of the GNU tools? In particular, I want to pipe the output of grep to the tool. I suppose that
sed may be the tool that does this, but I'm not sure how.