Search Results

Search: Posts Made By: ran123
1,989
Posted By ran123
Dedup a large file(30M rows)
Hi, I have a large file with number of records in there. I need some help to find only first row based on a key and ignore other rows with the same key. I tried few things but file is huge(30 million...
1,670
Posted By ran123
It is still giving the error
Raj,
Thanks for taking time to look into.

There is no ">" sign(it came as new line ). So I tried putting thiscommand in file and then execute file. But same error.

$ cat t1
awk 'BEGIN {...
1,670
Posted By ran123
Getting Error
I am getting below error when trying

$ awk 'BEGIN { flag=0;i=0;while ( getline < "a.sql" ) { gsub(" ","",$0);arr[i]=$0;i++ } }{x=$0;gsub(" ","",x);;if(x==arr[0]&&flag==0){flag=1;j=1;next};
>...
1,670
Posted By ran123
With sample data
Raj_srini thanks for looking into.

The actual SQL statement could be 100 line longer but I'll prepare smaller sample file.

say input sql file a.sql is as below
select
a,
b,
c
from my_table...
1,670
Posted By ran123
How to find multiple line matching?
Hi Unix Gurus,
I have two part of question. Any one or both answers will help me a lot.

I have a folder with many files in them. They contain SQL statement , Bind variables, Timing etc. I want...
7,869
Posted By ran123
Thank you. However to real use its giving me...
Thank you. However to real use its giving me error(on solaris 10)

awk '/T68.EVT_STAT_CD = :2/ && getline && /ORDER BY/ && FNR>1 {print FILENAME}' eCRMSSO*.log
awk: syntax error near line 1
awk:...
7,869
Posted By ran123
Thank you very much for the quick response. I am...
Thank you very much for the quick response. I am sorry, my bad, I have lot of files and want to know the file name that has this two consecutive pattern. Can sed be used for the same as well ?
...
7,869
Posted By ran123
grep two lines from a file
Sample File

abc
xyz
def
abc
ggh
abc
xyz


I just created a sample file above to show what I need. I need to grep two lines. e.g abc and xyz(only if they are one after the other) so output...
2,109
Posted By ran123
Need little more help
Even if some one has solution for any of point 1,2,3,4 then will be great help.

Is there possible to add two more things to this problem
1. Print the count of "SQL Statement Execute Time" for...
2,109
Posted By ran123
little more help
Thank you, Thank you, Thank you, Thank you very much all of you to look into the problem and give me some suggestions.
All the solutions are going to be very useful. To simplify the problem I made...
2,109
Posted By ran123
Reverse lookup and sum also
Hi,
I have log file name that shows the view name and some SQL statement time
stamp. I want to summarize the SQL time with view. Here is the simple example

Here the seqence is first it prints...
1,597
Posted By ran123
issue 2 resolved. issue 1 need help
Yes, your answer exactly does what is needed. Thank you very much.

For question 1 I need to file 2nd occurance of particular word starting from a particular word in file.
e.g find the second...
1,597
Posted By ran123
1. search 2nd pattern after a pattern and summarize stats
I have two questions. I am sure one of the Guru will be able to help either one or both.

1. Find 2nd occurance of pattern= "Bind variable after pattern="ABN USER Admin"
......
ABN USER Admin ...
3,724
Posted By ran123
Thanks
Brilliant !! You saved a lot of work for me. Thank you so much.

Thanks
Ranjit
3,724
Posted By ran123
How to extract block from a file?
I have siebel log file as following
EventContext .......
123
.......
SELECT
...
..
EventConext <---- Question 1 , I should get this line
345
......
SELECT <----- Question 2 , print this...
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 06:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy