I'd like to remove any line in an output file that is preceded by one or more warning messages (each warning is on a separate line).
Example :
Code:
WARNING: Estimation of lower confidence limit of \rho failed; setting it to 0.
822 28447 1.51e+05 0.00e+00<-8.66e-04<9.52e-03
WARNING: Estimation of lower confidence limit of \rho failed; setting it to 0.
823 28343 1.50e+05 0.00e+00<-8.82e-04<1.97e-02
WARNING: Estimation of lower confidence limit of \rho failed; setting it to 0.
WARNING: Estimation of upper confidence limit of \rho failed; setting it to 1.
824 28246 1.50e+05 0.00e+00<-5.84e-04<1.21e-03
All these lines should be deleted ; there can be more than 2 warnings, in which case the output line should be deleted as well.
A command like
Code:
sed '/WARNING/{N; //d}' SlFf.rho2
doesn't work for even numbers of warning messages.
I'm not familiar enough to the n, N, d, and D commands to figure out their behaviour. Any ideas ?
Hi all,
I am trying to figure out the syntx to delete multiple lines w/ sed. I know the following syntax will delete lines 1 THROUGH 5 from filex:
sed 1,5d filex
But I wan to delete lines 1 AND 5 (keeping lines 2,3, and 4). Does anyone know how to do this in a single sed statement?
... (2 Replies)
Hi,
I need to delete the lines with empty name.
What is the best way to do it?
Thanks a lot for your help!
EMID MMDDYY HOURS JOB EMNAME
0241 051605 11.40 52062 someone
0520 051605 10.63 52062
0520 051605 10.66 52062
0520 051605 10.65 52062 (3 Replies)
Good morning,
Novice scripter in Unix here, and I've run into and sed task I can't quite wrap my head around. I'm pulling my hair out fast enough as it is and thought I would go to the knowledge bank.
I have a sorted file that I'm trying to trim down by deleting any line whose first few... (2 Replies)
file1 contains the following data
sssssssssss
firstline
secondline pppppppppp
ssssssssss
Using sed comamnd i am trying to delete firtsline secondline.
so, output should be
sssssssssss
pppppppppp
ssssssssss
I tried in the following the way, but it is not working.
sed ... (9 Replies)
I've done this before but I can't remember how. Too long away from vi.
I want to do a search are replace, but I want the replace to be a join.
Example
see spot run
see spot walk
see spot run fast
see spot hop
%s/run$/<somehow perform a join with the next line>/g
so the results... (0 Replies)
First of all, I know this can be more eassily done with perl or other scripting languages but, that's not the issue. I need this in sed. (or wander if it's possible )
I got a file (trace file to recreate the control file from oracle for the dba boys)
which contains
some lines
another line... (11 Replies)
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Hi all,
I'm looking for a way (sed or awk) to delete multiple lines between blank lines containing two patterns ex:
user: alpha
parameter_1 = 15
parameter_2 = 1
parameter_3 = 0
user: alpha
parameter_1 = 15
parameter_2 = 1
parameter_3 = 0
user: alpha
parameter_1 = 16... (3 Replies)
Discussion started by: ce9888
3 Replies
LEARN ABOUT DEBIAN
tiffwarning
TIFFWarning(3TIFF)TIFFWarning(3TIFF)NAME
TIFFWarning, TIFFSetWarningHandler - library warning interface
SYNOPSIS
#include <tiffio.h>
void TIFFWarning(const char *module, const char *fmt, ...)
#include <stdarg.h>
typedef void (*TIFFWarningHandler)(const char *module, const char *fmt, va_list ap);
TIFFWarningHandler TIFFSetWarningHandler(TIFFWarningHandler handler);
DESCRIPTION
TIFFWarning invokes the library-wide warning handler function to (normally) write a warning message to the stderr. The fmt parameter is a
printf(3S) format string, and any number arguments can be supplied. The module parameter is interpreted as a string that, if non-zero,
should be printed before the message; it typically is used to identify the software module in which a warning is detected.
Applications that desire to capture control in the event of a warning should use TIFFSetWarningHandler to override the default warning han-
dler. A NULL(0) warning handler function may be installed to suppress error messages.
RETURN VALUES
TIFFSetWarningHandler returns a reference to the previous error handling function.
SEE ALSO TIFFError(3TIFF), libtiff(3TIFF), printf(3)
Libtiff library home page: http://www.remotesensing.org/libtiff/
libtiff October 15, 1995 TIFFWarning(3TIFF)