I have 5 filenames created inside a folder for one operation.The filenames are in the following format.
ES_currentdate_currenttime_processid_uniqueid.log
I want to read the status from the latest created file in that path.
The way I form the filename in shell script is:
$ filename=ES_*_uniqueid.log
$ echo grep "##status##XRB##" $HOME/log/$filename | sort -u` "
When I grep
it reads the status from all 5 files and echoes it. I want the string to be grep
only from the latest file that got created.
Could some one provide a solution?
grep
input and that file should be the last modified;slm
did it :)