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
uulog(1)						      General Commands Manual							  uulog(1)

NAME
uulog - display entries in the UUCP log file. SYNOPSIS
uulog [-#] [-n lines] [-sf system] [-u user] [-DSF] [--lines lines] [--system system] [--user user] [--debuglog] [--statslog] [--follow] [--follow=system] DESCRIPTION
The uulog program can be used to display entries in the UUCP log file. It can select the entries for a particular system or a particular user. You can use it to see what has happened to your queued jobs in the past. Different options may be used to select which parts of the file to display. OPTIONS
-#, -n lines, --lines lines Here '#' is a number; e.g., `-10'. The specified number of lines is displayed from the end of the log file. The default is to dis- play the entire log file, unless the -f, -F, or --follow options are used, in which case the default is to display 10 lines. -s system, --system system Display only log entries pertaining to the specified system. -u, --user user Display only log entries pertaining to the specified user. -D --debuglog Display the debugging log file. -S, --statslog Display the statistics log file. -F, --follow Keep displaying the log file forever, printing new lines as they are appended to the log file. -f system, --follow=system Keep displaying the log file forever, displaying only log entries pertaining to the specified system. Standard UUCP options: -X type, --debug type Turn on particular debugging types. The following types are recognized: abnormal, chat, handshake, uucp-proto, proto, port, config, spooldir, execute, incoming, outgoing. --debug option may appear multiple times. A number may also be given, which will turn on that many types from the foregoing list; for example, --debug 2 is equivalent to --debug abnormal,chat. -I file, --config Set configuration file to use. -v, --version Report version information and exit. --help Print a help message and exit. SEE ALSO
uucp(1) AUTHOR
Ian Lance Taylor <ian@airs.com>. Text for this Manpage comes from Taylor UUCP, version 1.07 Info documentation. Taylor UUCP 1.07 uulog(1)
All times are GMT -4. The time now is 01:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy