Hi,
i need to pick up dates and times from the file names which are of unequal length. The dates and time are delimited by dot. I am interested in getting the strings between the delimeter for fields -3, -4, -5 from behind (rear) so that the out put looks like :
071118.011300.556
I have tried with awk -F'.' '{print $3 '.'$4 '.'$5'}' filename
There is no consistency in the extractiion and i dont know how to read from the back which would have been more consistent.
See examples of filenames below:
nwg_0x005f_200611501-071118.011300.556.d3v4r5.bk
499c-9b4c-7808972f621d.7808972f621d.7808972f621d.7808972f621d.081222.201727.977.d3v70r764.bk
_cheshir.8c671a28-9a9d-42e9-96fd-02304c85bbf3.02304c85bbf3.02304c85bbf3.02304c85bbf3.090219.183923.709.d3v89r1353.bk
HC-071128.002729.081.d3v46r195.bk
al_0x005f_Publish-070724.195338.244.d3v9r20.bk
I need help.
Regards