I need to griddle a log file with today's date but the output is shown for more than today's date. Output: just type That is, to include the code, you have to include the I have a valid -% d ") file | Grep" EmpID # 106496 "2013-06-21 00: 01: 24,915 - Information EmpID # 106496 2013-06-21 00: 01: 24,915 - Information EmpID # 106496 grep date + "20% y-% m-% d" /path/log/General.log | Grep "EmpID # 106496" /path/log/Genral.log
2013-06-19 14: 47: 05,996 - Information EmpID # 106496 2013-06-19 14: 47: 05,996 - Information EmpID # 106496 2013-06-21 00: 01: 24,915 - Information EmpID # 106496 2013-06-21 00: 01: 24,915 - Information EmpID # 106496 date in the form of a pattern in grep Use in :
$ grep "$ (date +"% Y-% m-% d ")" file 2013-06-21 00: 01: 24,915 - Information 2013-06-21 00: 01: 24,915 - info date Will. Also, note that I have used y instead of your 20% y .
EmpID
No comments:
Post a Comment