Unix Shell Scripting to fetch the count of current date .XML File

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unix Shell Scripting to fetch the count of current date .XML File

Lokesh
Hi Team,

With the help of log file ,i need to fetch the count of current date .xml file in Shell scripting.

Could you please help me on this. PFB the log sample.

[20170525 12:20:06] [INFO] Downloaded *-5555555_*.xml to /cfes_gbr/data_out_crm/GINGER from ukslwpeft01
[20170525 12:20:09] [INFO] Removed *-5555555_*.xml from /sectrans_wmemwspp03/DataTransfers/CallCredit/In/Ginger/ on ukslwpeft01
[20170525 12:20:09] [INFO] /cfes/bin/cy_cfes_secdata_crypto.sh has Ended.
[20170525 12:30:03] [INFO] /cfes/bin/cy_cfes_secdata_crypto.sh has started for config file S2C_CALLCREDIT_GINGER_PP03.conf.
[20170525 12:30:06] [INFO] Looking for file *-5555555_*.xml.
[20170525 12:30:08] [INFO] Downloaded *-5555555_*.xml to /cfes_gbr/data_out_crm/GINGER from ukslwpeft01
[20170525 12:30:11] [INFO] Removed *-5555555_*.xml from /sectrans_wmemwspp03/DataTransfers/CallCredit/In/Ginger/ on ukslwpeft01
[20170525 12:30:11] [INFO] /cfes/bin/cy_cfes_secdata_crypto.sh has Ended.
[20170525 12:40:02] [INFO] /cfes/bin/cy_cfes_secdata_crypto.sh has started for config file S2C_CALLCREDIT_GINGER_PP03.conf.
[20170525 12:40:02] [INFO] Looking for file *-5555555_*.xml.
[20170525 12:40:06] [INFO] Downloaded *-5555555_*.xml to /cfes_gbr/data_out_crm/GINGER from ukslwpeft01
[20170525 12:40:09] [INFO] Removed *-5555555_*.xml from /sectrans_wmemwspp03/DataTransfers/CallCredit/In/Ginger/ on ukslwpeft01
[20170525 12:40:09] [INFO] /cfes/bin/cy_cfes_secdata_crypto.sh has Ended.
[20170525 12:50:01] [INFO] /cfes/bin/cy_cfes_secdata_crypto.sh has started for config file S2C_CALLCREDIT_GINGER_PP03.conf.
[20170525 12:50:01] [INFO] Looking for file *-5555555_*.xml.
[20170525 12:50:04] [INFO] Downloaded *-5555555_*.xml to /cfes_gbr/data_out_crm/GINGER from ukslwpeft01
[20170525 12:50:06] [INFO] Removed *-5555555_*.xml from /sectrans_wmemwspp03/DataTransfers/CallCredit/In/Ginger/ on ukslwpeft01
[20170525 12:50:06] [INFO] /cfes/bin/cy_cfes_secdata_crypto.sh has Ended.


Thanks & Regards
Lokesh Chandramohan
Reply | Threaded
Open this post in threaded view
|

Re: Unix Shell Scripting to fetch the count of current date .XML File

Guru
Administrator
What do you mean by current date .xml?  What is the expected output in this particular case?
Reply | Threaded
Open this post in threaded view
|

Re: Unix Shell Scripting to fetch the count of current date .XML File

Lokesh
In reply to this post by Lokesh
Hi Guru,

Thanks for your reply.

With the help of Log TimeStamp .I need to get the count of today's file alone.i.e (file extension : *.xml or any other extension ).

Thanks & Regards
Lokesh Chandramohan
Reply | Threaded
Open this post in threaded view
|

Re: Unix Shell Scripting to fetch the count of current date .XML File

souravsuman
if you have to get the data from the sample log you have given then this can be done using grep command

grep '20170525 ' <filename>