Jump to content

Recommended Posts

Posted

Thanks all...

The sed command produces an output but it's empty.. I have tried all variations of ur valuable suggestions ..

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

  • Ruler4Dmasses

    24

  • micxas

    8

  • xxxmen

    7

  • Silver_mani

    6

Top Posters In This Topic

Posted

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

Posted

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

Posted

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
Posted

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
Posted

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
Posted

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?
Posted

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.
Posted

This one I need to test


Nenu ichindi edi same just output vere file ki redirect chestunadu
Posted

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
Posted

grep -r comand nenichindi try chey man, it worked for me.. only thing is it parses file name as extra coloumn.. :)

Posted

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

Posted

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  :)

Posted

1td09%20%281%29.gif?1370670563peru perunaa andariki kruthagnathalu.... baabulu

×
×
  • Create New...