Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
3 questions with no upvoted or accepted answers
0 votes
3 answers
194 views

Check which string occurs first in a growing file

I'm running a remote executable which produces a logfile. I want to write a script to check whether the executable is run successfully or encounters an error. The way I can do this is by looking at ...
Eddy's user avatar
  • 3,397
0 votes
3 answers
297 views

Grep for block surrounding an error message

I want to grep for the block of logs around a particular error message. Say I know my log looks like this: [----] I, [2014-04-10T19:12:36.294512 #1910:e93004] INFO -- : Started GET "/ems_infra/new" ...
CHK's user avatar
  • 587
-1 votes
1 answer
560 views

how to find a particular log from a server for one particular time and zip logs for only that time

I have got a command for the above question. Could anyone please explain me the below command? DATE=`date +%m%d%Y-%H%M%S` ; for i in `ls -lt *.log* | grep "Oct 11" | grep -E '12:|13:|14:' | awk '{...
Smitha's user avatar
  • 1