Sponsored Content
Special Forums UNIX and Linux Applications how to get a part of file pertaining to a condition Post 302156875 by chaitanyassk on Wednesday 9th of January 2008 10:40:22 AM
Old 01-09-2008
Quote:
Originally Posted by sysgate
after which date ? what applications is writing to this log file ? what is the OS ? what languages (if) need to be deployed ? are you root ? Please post more details with some samples.
********************************************************we need to retain the log for last one month
applicaton writing is: Abinito
NO we are not the root.




here is a part of the log


--------------------------------------------------------------------------------
Data Bytes Records Status Skew Flow
Vertex Port
--------------------------------------------------------------------------------
Apr 05 11:24:58 Phase 4 ended (3 seconds)
CPU Time Status Skew Vertex
0.330 [ : 1] 0% Job_Audit_Complete.gatherlg_log
0.340 [ : 1] 0% Job_Audit_Complete.gatherlg_log_1
0.540 [ : 1] 0% Job_Audit_Complete.gen_rec_job_audit
0.360 [ : 1] 0% Job_Audit_Complete.reformat_job_audit
1.140 [ : 1] 0% Job_Audit_Complete.updtab_job_audit
--------------------------------------------------------------------------------
Data Bytes Records Status Skew Flow
Vertex Port
112 1 [ : : 1] 0% Job_Audit_Complete.Flow_1
Job_Audit_Complete.gen_rec_job_audit out
112 1 [ : : 1] 0% Job_Audit_Complete.Flow_1
Job_Audit_Complete.reformat_job_audit in
77 1 [ : : 1] 0% Job_Audit_Complete.Flow_2
Job_Audit_Complete.reformat_job_audit out0
77 1 [ : : 1] 0% Job_Audit_Complete.Flow_2
Job_Audit_Complete.updtab_job_audit in
337 2 [ : : 1] 0% Job_Audit_Complete.Flow_3
Job_Audit_Complete.reformat_job_audit log
337 2 [ : : 1] 0% Job_Audit_Complete.Flow_3
Job_Audit_Complete.gatherlg_log in
4,395 27 [ : : 1] 0% Job_Audit_Complete.Flow_4
Job_Audit_Complete.updtab_job_audit log
4,395 27 [ : : 1] 0% Job_Audit_Complete.Flow_4
Job_Audit_Complete.gatherlg_log_1 in
------------------------------------------------------------------------
++GTR++;J4,-1;--GTR--


this is a part of the log
basing on the date condition we need to get the log for last one month
++GTR++;J4,-1;--GTR-- is the ending string for a particular days log
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to parse through a file and based on condition form another output file

I have one file say CM.txt which contains values like below.Its just a flat file 1000,A,X 1001,B,Y 1002,B,Z ... .. total around 4 million lines of entries will be in that file. Now i need to write another file CM1.txt which should have 1000,1 1001,2 1002,3 .... ... .. Here i... (6 Replies)
Discussion started by: sivasu.india
6 Replies

2. UNIX for Dummies Questions & Answers

need to fetch the ip address pertaining to the modified file

hi all i need to find the ip address related to the modified files ... since the user id for all is the same in the server i am operating with, making file monitoring difficult.... if a file is midified then the ip address of the person who does the change should be logged in.... is there any... (2 Replies)
Discussion started by: sais
2 Replies

3. Shell Programming and Scripting

If condition to check one file newer than the other - first file name uncertain

Dear All, I'm new to unix scripting. I'm trying to write an utility script which has to check if one file is newer than another one. The condition is I dont know the full name of the first file. I searched google and this forum for any such examples, but couldn't find any or may be I would have... (9 Replies)
Discussion started by: achilles5
9 Replies

4. HP-UX

Difference between [condition] and [[condition]] and ((condition)) when used with if condition

Executed the following if conditions .. and got different results . only (( )) gave correct o/p with all scenarios . Can anybody please let me know what is the difference between and ] and ((condition)) when used with if condition. And why each condition gave different result. 1.... (2 Replies)
Discussion started by: soumyabubun
2 Replies

5. Shell Programming and Scripting

redirect stdout echo command in condition A run in condition B

hi, I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command Here are my simple script After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
Discussion started by: jao_madn
3 Replies

6. Shell Programming and Scripting

[Solved] Printing a part of the last line of the specific part of a file

Hi, I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this: Name =A xxxxxx yyyyyy zzzzzz aaaaaa bbbbbb Value = 57 This is necessary because in a file there are written more lines which... (6 Replies)
Discussion started by: wenclu
6 Replies

7. Shell Programming and Scripting

If condition return 0 even when it fails to satisfy te condition

HI My doubt may be basic one but I need to get it clarified.. When i use "if" condition that checks for many AND, OR logical conditions like if ]; then return 0 fi Even the if condition fails it returns as zero.. Any clue.. But if i add else condition like if ]; ... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies

8. Shell Programming and Scripting

Remove part of the file using a condition

Gents, Is there the chance to remove part of the file, Taking in consideration this condition. For each record the first row start with the string % VE should be 56 rows for each records.. first row = % VE last row = % sw total 56 rows for each record. Then in the case that the... (4 Replies)
Discussion started by: jiam912
4 Replies

9. UNIX for Beginners Questions & Answers

How to make a loop to read the input from a file part by part?

Hi All, We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Discussion started by: arun_adm
6 Replies
XSLT_SET_LOG(3) 							 1							   XSLT_SET_LOG(3)

xslt_set_log - Set the log file to write log messages to

SYNOPSIS
void xslt_set_log (resource $xh, [mixed $log]) DESCRIPTION
This function allows you to set the file in which you want XSLT log messages to, XSLT log messages are different than error messages, in that log messages are not actually error messages but rather messages related to the state of the XSLT processor. They are useful for debugging XSLT, when something goes wrong. By default logging is disabled, in order to enable logging you must first call xslt_set_log(3) with a boolean parameter which enables log- ging, then if you want to set the log file to debug to, you must then pass it a string containing the filename. PARAMETERS
o $ xh -The XSLT processor link identifier, created with xslt_create(3). o $log - This parameter is either a boolean value which toggles logging on and off, or a string containing the logfile in which log errors too. RETURN VALUES
No value is returned. NOTES
Note Please note that file:// is needed in front of the path when using Windows. EXAMPLES
Example #1 Using the XSLT Logging features <?php $xh = xslt_create(); xslt_set_log($xh, true); xslt_set_log($xh, getcwd() . '/myfile.log'); $result = xslt_process($xh, 'dog.xml', 'pets.xsl'); echo $result; xslt_free($xh); ?> PHP Documentation Group XSLT_SET_LOG(3)
All times are GMT -4. The time now is 01:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy