I have a requirement where I have to get the duplicate string count and uniq error message. Below is my file:
Here I need to get the 1st line with table and column detail and second line for the error String. There are hundreds of the same error like this in my file ....so I need the count of the error for a particular error on table.column and the unique {error message} with table.column details.
It should come something like:
Thanks in advance
Last edited by Don Cragun; 02-12-2016 at 04:00 AM..
Reason: Add CODE tags.
Thanks a lot Ravinder. One more question.
My file is a sqlldr log in which many other msg and content is there.
Actually I was getting the exact msg which contain only error by below command(that msg content is in my first question)
From this command I am getting my desired error messages which i was initially redirecting to a file and then the awk function will use it to give me error count with error msg.
Now I don't want to create a separate file and want to directly pass the strings to the awk function. How I can do that.
Thanks again for the help.
Last edited by Don Cragun; 02-12-2016 at 04:02 AM..
Reason: Add CODE and ICODE tags; s/AWK/awk/g.
Hi ,
I had a requirement to compare two files whether the two files are same or different .... like(files contaisn of two columns each)
file1.txt
121343432213 1234
64564564646 2345
343423424234 2456
file2.txt
121343432213 1234
64564564646 2345
31231313123 3455
how to... (2 Replies)
Hi all
I have a grep written to pull out values; below (in the code snip-it) is an example of the output.
What I'm struggling to do, and looking for assistance on, is identifying the lines that have duplicate strings.
For example 74859915K74859915K in the below is 74859915K repeated twice but... (8 Replies)
Hi Perl users,
I have another problem with text processing in Perl. I have a file below:
Linux Unix Linux Windows SUN
MACOS SUN SUN HP-AUX
I want the result below:
Unix Windows SUN
MACOS HP-AUX
so the duplicate string will be removed and also the keyword of the string on... (2 Replies)
I have to get the last value from a string, below is the example string
String -> Here is the test string 12233
O/P -> 12233
String -> Hello world 500
O/P -> 500
String -> 300
O/P -> 300
Please help (2 Replies)
Hi All,
I am trying to to compare a string variable with a string literal inside a loop but keep getting the
./testifstructure.sh: line 6:
#!/bin/sh
BOOK_LIST="BOOK1 BOOK2"
for BOOK in ${BOOK_LIST}
do
if
then echo '1'
else
echo '2'
fi
done
Please use next... (1 Reply)
how to duplicate an output from a shell command?
for example:
`date` will give the current date to the console.
I want this to be displayed in console and also parallely store it in file or variable.
user1@solaris4:~> date
Tue Feb 28 17:48:31 EST 2012
user1@solaris4:~> date > file
... (3 Replies)
Hi,
do you have awk or sed sommand taht will delete duplicate lines like.
sample:
server1-log1-14
server1-log2-14
superserver-time-2
superserver-log-2
output:
server-log1-14
superserver-time-2
thansk (2 Replies)
My input contains a single word lines.
From each line
data.txt
prjtestBlaBlatestBlaBla
prjthisBlaBlathisBlaBla
prjthatBlaBladpthatBlaBla
prjgoodBlaBladpgoodBlaBla
prjgood1BlaBla123dpgood1BlaBla123
Desired output -->
data_out.txt
prjtestBlaBla
prjthisBlaBla... (8 Replies)
File_A contains Strings:
a
b
c
d
File_B contains Strings:
a
c
z
Need to have script written in either sh or ksh. Derive resultant files (File_New_A and File_New_B) from lists File_A and File_B where string elements in File_New_A and File_New_B are listed below.
Resultant... (7 Replies)