Below is my Scenario.
I wrote one script to search the specific log files for Yesterdays date and gives the result.
I need a script like
-
Once I run the Script, The script should ask me which date I want to search.
-
Once i enter the date, That script should search the log files for a given date and has to gives the result.
Below is my sample script which automattically collect the Yesterdays data
grep -n processed: /var/Messages/datalogs | grep -n "$( date -d '1 day ago' +'%Y-%m-%d' )"
Please help me in this
Sorry For my English