08-14-2018
Grep a log file starting from a specific time to the end of file
I have a log file which have a date and time at the start of every line.
I need to search the log file starting from a specific time to the end of file.
For example:
Starting point: July 29 2018 21:00:00
End point : end of file
My concern is what if the pattern of `July 29 2018 21:00:00` does not exist, I still want to get the lines between for example `July 29 2018 21:05:11` since this is still beyond `July 29 2018 21:00:00`.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to Print starting 3rd line until end of the file. Pls let me know the command.
Thanks in advance. (1 Reply)
Discussion started by: smc3
1 Replies
2. Shell Programming and Scripting
Hi Folks,
I got to know from this forums on how to grep from a particular line say line 6
awk 'NR==6 {print;exit}'
But how do i grep from line 6 till the end of the file or command output.
Thanks, (3 Replies)
Discussion started by: Mr. Zer0
3 Replies
3. Shell Programming and Scripting
Hello people,
I'm scratch my head to find a solution to my problem, I'm absolutely sure this is very simple!!! :wall:
I'm using the tcpdump to show on the screen in real time the UCP traffic:
tcpdump -l -i bond1 -s 1514 -nntttt -A src or dst 192.168.1.5 and port 10000 | egrep "/51/"The output... (5 Replies)
Discussion started by: Lord Spectre
5 Replies
4. Shell Programming and Scripting
Hi All,
Need a small help. I have a log file which keeps updating for every Minute with multiple number of lines. I just want to grep few properties which has latest Date and Time to it. How do i do it?
I wanted to grep a property by name "Reloading cache with a maximum of" from the... (4 Replies)
Discussion started by: nvindraneel
4 Replies
5. Shell Programming and Scripting
Hi ,
I am trying to extract contents of a file between specified time stamp. but it does not seem to work. i am trying to extract output of /var/adm/messages between 15:00:00 to 15:23:59 .
i have tried two regex the first one seems to kind of work. it displays some output. the second one is... (13 Replies)
Discussion started by: chidori
13 Replies
6. Shell Programming and Scripting
Hi, im trying to write a grep script that returns me the last inputs added in the last hour in the log file. Literally i have nothing yet but:
grep 'Line im looking for' LOGFILE.log | tail -1
this only gives me the last input, but no necessarily from the last hour.
Help Please. (4 Replies)
Discussion started by: blacksteel1988
4 Replies
7. UNIX for Dummies Questions & Answers
Hello All,
this is my first post so I don't know if I am doing this right.
I would like to append entries from a series of strings (contained in a text file) consecutively at the end of specifically labeled lines in another file.
As an example:
- the file that contains the values to be... (3 Replies)
Discussion started by: gus74
3 Replies
8. Shell Programming and Scripting
HI,
I want to search for a logs which are trace between specific date and time from logs file.
My logs are generated like this :-
Tue Jun 18 05:00:02 EEST 2013 | file_check.sh| Message:script has files to process.
Thu Jun 20 05:00:02 EEST 2013 | file_check.sh| Message:script has files to... (5 Replies)
Discussion started by: ketanraut
5 Replies
9. Shell Programming and Scripting
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies
10. UNIX for Dummies Questions & Answers
e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies
LEARN ABOUT OPENDARWIN
log
LOG(3) BSD Library Functions Manual LOG(3)
NAME
log, log2, log10, log1p, -- logarithm functions
SYNOPSIS
#include <math.h>
double
log(double x);
double
log2(double x);
double
log10(double x);
double
log1p(double x);
DESCRIPTION
The log() function computes the value of the natural logarithm of argument x.
The log2() function computes the value of the logarithm of argument x to base 2.
The log10() function computes the value of the logarithm of argument x to base 10.
The log1p() function computes the value of log(1+x) accurately even for very small values of x.
SPECIAL VALUES
log(+-0) , log2(+-0) , and log10(+-0) return -infinity and raise the "divide-by-zero" floating-point exception.
log(1) , log2(1) , and log10(1) return +0.
log(x) , log2(x) , and log10(x) return a NaN and raise the "invalid" floating-point exception for x < 0.
log(+infinity) , log2(+infinity) , and log10(+infinity) return +infinity.
log1p(+-0) returns +-0.
log1p(-1) returns -infinity and raises the "divide-by-zero" floating-point exception.
log1p(x) returns a NaN and raises the "invalid" floating-point exception for x < -1.
log1p(+infinity) returns +infinity.
SEE ALSO
math(3), exp(3), exp2(3), expm1(3), pow(3), infnan(3)
STANDARDS
The log() , log2() , log10() , and log1p() functions conform to ISO/IEC 9899:1999(E).
4th Berkeley Distribution July 2, 2003 4th Berkeley Distribution