Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Parsing log file continuously Post 302394786 by nerd1951 on Friday 12th of February 2010 02:12:37 PM
Old 02-12-2010
You can try this, assuming that the logfile already exists and that the command opens the log file for append. This will first start a process that monitors the log file. Then you can start your command that appends to the logfile

Code:
tail -f existing log file name | grep exception >> location where to copy &
command


Last edited by pludi; 02-12-2010 at 04:08 PM.. Reason: almost. it's [code], not <code>
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parsing a Log file

Hi All, I'm deffently not a Unix specialist so be Gentel. I need to parse a Log file that looks like that: 2006-06-12 01:00:00,463 ERROR {cleanLoggersFiles} General Error comverse.compas.shared.exceptions.SystemParametersException: Error in reading parameter FileLocation at... (4 Replies)
Discussion started by: tbirenzweig
4 Replies

2. UNIX for Dummies Questions & Answers

Script for parsing details in a log file to a seperate file

Hi Experts, Im a new bee for scripting, I would ned to do the following via linux shell scripting, I have an application which throws a log file, on each action of a particular work with the application, as sson as the action is done, the log file would vanish or stops updating there, the... (2 Replies)
Discussion started by: pingnagan
2 Replies

3. UNIX for Dummies Questions & Answers

parsing a log file

I need help in parsing the following log files. 10 Apr 2009 0:16:16 * name: Tuna Belly Format: Well done, Price: 999 only 10 Apr 2009 0:16:16 * name: Roast Beef Format: Raw, Price: 55 c 10 Apr 2009 0:16:16 * name: Pasta Format: Dry, Price: 88.43 only etcetc I need to parse this... (8 Replies)
Discussion started by: izuma
8 Replies

4. Shell Programming and Scripting

Shell Script to continuously scan a log file

Hello members, I have some doubts on how to write a script that can reports success / failure of a batch job ? 1. Run a batch job: 2. Wait and search for a particular string in the Log file: tail -f log01*.txt | egrep -v "^SUCCESSFUL" echo "continue with the other tasks" ... (1 Reply)
Discussion started by: novice82
1 Replies

5. Shell Programming and Scripting

Continuously display the file name in vim

Hi All, In vim, when we press ^G, the file name is displayed at the bottom of the screen and as soon as we enter into some other mode (say e.g. Insert), the file name is replaced by the words "Insert". I was just wondering whether it is possible to continuously show the file name no matter which... (3 Replies)
Discussion started by: jal_capri
3 Replies

6. Shell Programming and Scripting

Script for Parsing Log File

Working on a script that inputs an IP, parses and outputs to another file. A Sample of the log is as follows: I need the script to be able to input IP and print the data in an output file in the following format or something similar: Thanks for any help you can give me! (8 Replies)
Discussion started by: Winsarc
8 Replies

7. Shell Programming and Scripting

Help Parsing a Log File

Hello all, I am new to scripting and I have written a script that performs an Rsync on my NAS and then moves on to send me an email with the status etc. The problem is that I think Rsync is taking to long to complete and the IF statement is timing out, as it doesn't appear to move on. Here... (1 Reply)
Discussion started by: Mongrel
1 Replies

8. Shell Programming and Scripting

Parsing Log File help

Hi, I am a newbie to scripting. I have multiple log files (saved as .gz) in a directory that looks like this 01-01-2013 10:00 pn: 123 01-01-2013 10:00 sn: 987 01-01-2013 10:00 Test1 01-01-2013 10:00 Result: Pass 01-01-2013 10:00 Time: 5:00 01-01-2013 10:00 Test2 01-01-2013 10:00... (3 Replies)
Discussion started by: linuxnew
3 Replies

9. Shell Programming and Scripting

HELP on parsing this log file

Hi, I have a log file that looks like below and I am wanting to know if there is a better way of parsing it from how I am doing it right now. I am looking for when an application service is OFFLINE and ONLINE. This log file is getting written into every 30 minutes ... (1 Reply)
Discussion started by: newbie_01
1 Replies

10. UNIX for Beginners Questions & Answers

Shell script for continuously monitoring log file

Hi I have written below log monitoring script to egrep multiple words and redirect the output to a text file and its working fine but I want to add some more below given functionality to it, which is very advance and im not very good in it, so please help if you can :) I am egrepping all the... (1 Reply)
Discussion started by: scazed
1 Replies
log(3M) 						  Mathematical Library Functions						   log(3M)

NAME
log, logf, logl - natural logarithm function SYNOPSIS
c99 [ flag... ] file... -lm [ library... ] #include <math.h> double log(double x); float logf(float x); long double logl(long double x); DESCRIPTION
These functions compute the natural logarithm of their argument x, log(e)(x). RETURN VALUES
Upon successful completion, log() returns the natural logarithm of x. If x is +-0, a pole error occurs and log(), logf(), and logl() return -HUGE_VAL, -HUGE_VALF, and -HUGE_VALL, respectively. For finite values of x that are less than 0, or if x is -Inf, a domain error occurs and a NaN is returned. If x is NaN, a NaN is returned. If x is 1, +0 is returned. If x is +Inf, x is returned. For exceptional cases, matherr(3M) tabulates the values to be returned by log() as specified by SVID3 and XPG3. ERRORS
These functions will fail if: Domain Error The finite value of x is negative, or x is -Inf. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, the invalid floating-point exception is raised. The log() function sets errno to EDOM if the value of x is negative. Pole Error The value of x is 0. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, the divide-by-zero floating-point exception is raised. USAGE
An application wanting to check for exceptions should call feclearexcept(FE_ALL_EXCEPT) before calling these functions. On return, if fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an exception has been raised. An application should either examine the return value or check the floating point exception flags to detect exceptions. An application can also set errno to 0 before calling log(). On return, if errno is non-zero, an error has occurred. The logf() and logl() functions do not set errno. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
exp(3M), feclearexcept(3M), fetestexcept(3M), isnan(3M), log10(3M), log1p(3M), math.h(3HEAD), matherr(3M), attributes(5), standards(5) SunOS 5.11 12 Jul 2006 log(3M)
All times are GMT -4. The time now is 10:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy