I'm reading each line (while loop) and parsing the values to an output file based upon column-4.
When it reads 'K' type of line it extracts the value within the brackets in the last column(here, LOGOFF).
I need to achieve this:
If it is equal to LOGOFF or TURNOFF or CLOSE read the next lines as usual continously. If it is not equal to LOGOFF or TURNOFF or CLOSE, do not read the next lines that have the same combination of values present in column-1,2,3.
Here, do not read a line that has values
'column-1=99' && 'column-2=1234' && 'column-3=2010-11-21 12:12:12'
Using grep for searching the pattern and break for not reading the line is prefered.
Hi,
the text <<read>> and <<do not read>> are not part of the input file. That is why I highlighted with red.
The lines <read> are to be parsed to another output file.
<do not read> have to be skipped to be parsed to the output file
Hi Experts
I have small query where I request the into a single file
Suppose:
File1: {Unique entries}
AA
BB
CC
DD
FileB:
AA, 123
AA, 234
AA, 2345
CC, 123
CC, 5678
DD,123
BB, 7890 (5 Replies)
Hi,
I've written a script to search for an Oracle ORA- error on a log file, print that line and the .trc file associated with it as well as the dateline of when I assumed the error occured. In most it is the first dateline previous to the error.
Unfortunately, this is not a fool proof script.... (2 Replies)
Hello,
i have a question.
My problem is that i have a file like:
TEST
JOHN
ADAM
MICHAEL
SEBASTIAN
ANDY
i want find for MICHAEL and want delete lines like this:
TEST (4 Replies)
Hi friends,
I am looking for sed command/script that would search for a given fixed pattern on odd lines and then if it matches, prints the matching pattern and the next line. For example, in the example below, i am looking for pattern 0 and 1011 on odd lines.
########## start of example file... (10 Replies)
I have a file split something like
01/11/2010:
No of users 100
02/11/2010:
No of users 102
03/11/2010:
No of users 99
...
I want to search the file for a particular date and then extract the following line with the date, something like
02/11/2010 No of users 102
I can grep... (6 Replies)
Gurus,
I have a big file that needs to be sorted out and I cant figure out what to do. The file name is as below:
Name: xxxx yyyy nnnn
Description: dfffgs sdgsgsf hsfhhs
afgghhjdgj
fjklllll gsfhfh
Updated: jafgadsgg gsg
Corrected: date today
The file consists of line like these.
... (13 Replies)
Hi,
I have to search those statements from the file which starts from "shanky"(only shanky, shanky09 or 09shanky is not allowed) and ends with ");". These two string can be in a same line or different line. And also i have to negate those lines which starts with #.
Can any one please give me... (2 Replies)
hi,
I have a file say x.txt containing
xxx
123
bla
bla
...
you
xxx
dfk
dbf
...
me
xxx
...
...
keeps on..
i need to search for pattern in the line starting xxx in the file. If pattern matched, I need to fetch all the lines till i find next xxx. (17 Replies)
I want to search a file for a string and then if the string is found I need the line that the string is on - but also the previous two lines from the file (that the pattern will not be found in)
This is on solaris
Can you help? (2 Replies)