I've tried using GREP as suggested, but it did not work. Please see below for errors.
I've also tried using SED, but this does not produce the correct output.
Sorry if my explanation was not very clear. Let me try to put it in a better way.
I wanted to extract a portion of log file if it is contains this wording: "A tool used by tp produced warnings".
For example:
If the log file contains: "A tool used by tp produced warnings", then the script should extract the following information.
First sample output:
--------------------
Or alternatively, to make it simpler, if the script could produce the following output based on the given wording, it would be sufficient.
Second sample output:
-----------------------
Appreciate if anyone could help out.
hello,
I want to grep the log file according to time and get the portion of log from one particular time to other.
I can grep for individual lines by time but how should I print lines continuously from given start time till end till given end time.
Appreciate your ideas,
Thanks
chandra (8 Replies)
hi guys i need to extract information from log files generated by an application.
log file has the following lines for each process..
----------------------------------------------
Fri Aug 03 12:06:43 WST 2007 INFO: Running project PROJECT1
Fri Aug 03 12:06:43 WST 2007 INFO: Source Files... (7 Replies)
I am using Unix on Mac OS X 10.5.6.
I am trying to extract the last entry of a log (text) file. As seen below, each log entry looks like the following (date and time change with each log entry):
I want the script to extract everything quoted above, including the "===" dividers.
... (2 Replies)
I regularly extract lines of text from files based on the presence of a particular keyword; I place the extracted lines into another text file. This takes about 2 hours to complete using the "sort" command then Kate's find & highlight facility.
I've been reading the forum & googling and can find... (4 Replies)
Hi Gurus
I'm using HPUX B.11.23 ia64, the below sample log data was extracted from HPUX commnad: last -R.
Sample data:
root pts/ta userpc Wed Aug 11 09:46 - 20:21 (10:35)
root pts/ta userpc Wed Aug 11 09:44 - 20:10 (10:34)
root pts/ta userpc Wed Aug 11... (4 Replies)
I have a huge file (about 2 millions records) contains data separated by “,” (comma). As part of the requirement, I can't change the format. The objective is to remove some of the records with the following condition. If the 23rd field on each line start with 302 , I need to remove that from the... (4 Replies)
I have a LOG file which looks like this
Import started at: Mon Jul 23 02:13:01 EDT 2012
Initialization completed in 2.146 seconds.
--------------------------------------------------------------------------------
--
Import summary for Import item: PolicyInformation... (8 Replies)
I have a folder containing text files. I need to extract specific lines from the files of this folder based on another file input.txt. How can I do this with awk/sed?
file1
ARG 81.9 8 81.9 0
LEU 27.1 9 27.1 0
PHE .0 10 .0 0
ASP 59.8 11 59.8 0
ASN 27.6 12 27.6 0
ALA .0 13 .0 0... (5 Replies)
I have an input file with
A=xyz
B=pqr
I would want the value in Second Field (xyz or pqr) updated with a value present in Shell Variable based on the value passed in the first field. (A or B )
while read line
do
NEW_VALUE = `some functionality done on $line`
If $line=First Field-... (1 Reply)
Discussion started by: infernalhell
1 Replies
LEARN ABOUT HPUX
u3b10
machid(1) General Commands Manual machid(1)NAME
machid: hp9000s200, hp9000s300, hp9000s400, hp9000s500, hp9000s700, hp9000s800, hp-mc680x0, hp-pa, pdp11, u370, u3b, u3b10, u3b2, u3b5, vax
- provide truth value about processor type
SYNOPSIS DESCRIPTION
The following commands return a true value (exit code 0) if the a processor type matches the command name. Otherwise a false value (exit
code nonzero) is returned. These commands are commonly used within makefiles and shell procedures to improve portability of applications
(see make(1)).
+-----------+-------------------------++--------+--------------------------+
|Command | True for ||Command | True for |
+-----------+-------------------------++--------+--------------------------+
|hp9000s200 | Series 200 ||pdp11 | PDP-11/45 or PDP-11/70 |
|hp9000s300 | Series 300 ||u3b | 3B20 computer |
|hp9000s400 | Series 400 ||u3b2 | 3B2 computer |
|hp9000s500 | Series 500 ||u3b5 | 3B5 computer |
|hp9000s700 | Series 700 ||u3b10 | 3B10 computer |
|hp9000s800 | Series 800 or 700 ||u370 | IBM System/370 computer |
|hp-mc680x0 | Series 200, 300, or 400 ||vax | VAX-11/750 or VAX-11/780 |
|hp-pa | Series 700 or 800 || | |
+-----------+-------------------------++--------+--------------------------+
EXAMPLES
Given a shell script that must behave differently when run on an HP 9000 Series 700 or 800 system, select the correct code segment to be
executed:
WARNINGS
always returns true on both Series 800 and Series 700 systems. Therefore, when using this command in scripts to determine hardware type,
always use both and in the appropriate sequence to ensure correct results (see
machid(1) will no longer provide support for future machines beyond the Series 800 and Series 700 systems. Decisions should be based on
the hardware and software configuration information returned by getconf(1).
SEE ALSO getconf(1), make(1), sh(1), test(1), true(1).
machid(1)