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.
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)
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)
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)
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 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)
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 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)
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 ,
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)
Discussion started by: hemanthsaikumar
2 Replies
LEARN ABOUT HPUX
xterrorhandler
XtErrorHandler() XtErrorHandler()
Name
XtErrorHandler - interface definition for low-level error and warning handler procedures.
Synopsis
typedef void (*XtErrorHandler)(String);
String message;
Inputs
message Specifies the error message.
Description
An XtErrorHandler is registered as an error or warning handler with XtAppSetErrorHandler() or XtAppSetWarningHandler(). It is invoked by
XtAppError() or XtAppError(). The error handler should display the specified string in some appropriate fashion. Some applications may
wish to log errors to a file as well. Error handlers should exit; warning handlers should return.
See XtErrorMsgHandler(2) for a description of the high-level error and warning handler procedure.
Example
The Intrinsics default error and warning handlers are shown below. The XTERROR_PREFIX and XTWARNING_PREFIX symbols are by default the
empty string in the MIT implementation, but may be configured when the Intrinsics are compiled.
void _XtDefaultError(message)
String message;
{
extern void exit();
(void)fprintf(stderr, "%sError: %s0, XTERROR_PREFIX, message);
exit(1);
}
void _XtDefaultWarning(message)
String message;
{
if (message && *message)
(void)fprintf(stderr, "%sWarning: %s0, XTWARNING_PREFIX, message);
return;
}
See AlsoXtAppError(1), XtAppSetErrorHandler(1), XtAppSetWarningHandler(1), XtAppWarning(1),
XtErrorMsgHandler(1).
Xt - Error Handling XtErrorHandler()