Ruler4Dmasses Posted July 31, 2014 Author Report Posted July 31, 2014 Thanks all... The sed command produces an output but it's empty.. I have tried all variations of ur valuable suggestions ..
spyguy Posted July 31, 2014 Report Posted July 31, 2014 sed -n '/Jan 1 00:48:25/ , /Jan 1 22:48:25/p' system.log >>test.log, naku idhi workout ayyindhi, but the only caveat is, these two time stamps should exist in the log file
Ruler4Dmasses Posted July 31, 2014 Author Report Posted July 31, 2014 Thanks a lot manmadhan for reaching out and helping .. With some back end adaptations was able to get the needed. Cat filename | grep "[29/Jan/2013:00" ]> new file Produced a new file but copied the whole of it.. Then removed [] and tried the same.. It produced a file for one hour (I.e) 00:00:00 to 01:00:00 Then took that new file and searched for line and random search by 10000G 12200G 16400G to check the time stamp of those particular or near by lines... This way was able to figure out where the 10 min ended .... And was able to head that many lines to an output.. I still wonder if the intermediate lines are needed; what's the shortest and apt way? Thanks all
xxxmen Posted July 31, 2014 Report Posted July 31, 2014 Thanks all... The sed command produces an output but it's empty.. I have tried all variations of ur valuable suggestions .. Etta mayya nenu Ubuntu lo test chesi mari esa eda
Ruler4Dmasses Posted July 31, 2014 Author Report Posted July 31, 2014 Etta mayya nenu Ubuntu lo test chesi mari esa eda Don't know why .. It gave me the desired output file name which I gave .. But without the results in it .. Zero byte
Ruler4Dmasses Posted July 31, 2014 Author Report Posted July 31, 2014 sed -n '/Jan 1 00:48:25/ , /Jan 1 22:48:25/p' system.log >>test.log, naku idhi workout ayyindhi, but the only caveat is, these two time stamps should exist in the log file This one I need to test
xxxmen Posted July 31, 2014 Report Posted July 31, 2014 Don't know why .. It gave me the desired output file name which I gave .. But without the results in it .. Zero byte Ni log file lo date format etta vundi?
Ruler4Dmasses Posted July 31, 2014 Author Report Posted July 31, 2014 Ni log file lo date format etta vundi? 29/Jan/2013 00:00 alaaa.. I tried both ways like the one you mentioned and my format as well but did not .. I'm not sure if something was missing at my end.
xxxmen Posted July 31, 2014 Report Posted July 31, 2014 This one I need to test Nenu ichindi edi same just output vere file ki redirect chestunadu
xxxmen Posted July 31, 2014 Report Posted July 31, 2014 29/Jan/2013 00:00 alaaa.. I tried both ways like the one you mentioned and my format as well but did not .. I'm not sure if something was missing at my end. Log file winscp nundi download chesi naku pm chestava? And ni timeframe chepu output ista
micxas Posted July 31, 2014 Report Posted July 31, 2014 grep -r comand nenichindi try chey man, it worked for me.. only thing is it parses file name as extra coloumn.. :)
xxxmen Posted July 31, 2014 Report Posted July 31, 2014 Edi kuda working mayya datte dagira exact date peti taruvata time petu awk -vDate=`date -d'now-2 hours' +[%d/%b/%Y:%H:%M:%S` ' { if ($4 > Date) print Date FS $0}' messages
micxas Posted July 31, 2014 Report Posted July 31, 2014 Edi kuda working mayya datte dagira exact date peti taruvata time petu awk -vDate=`date -d'now-2 hours' +[%d/%b/%Y:%H:%M:%S` ' { if ($4 > Date) print Date FS $0}' messages It seems you are an expert in unix :)
xxxmen Posted July 31, 2014 Report Posted July 31, 2014 It seems you are an expert in unix :) Ledu mayya
Ruler4Dmasses Posted August 1, 2014 Author Report Posted August 1, 2014 peru perunaa andariki kruthagnathalu.... baabulu
Recommended Posts