Sponsored Content
Top Forums Shell Programming and Scripting sed problem - delete all lines until a match on 2 lines Post 302354364 by puni on Friday 18th of September 2009 01:18:22 AM
Old 09-18-2009
Hi thank a lot folks, now i understood
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to delete lines do NOT match a pattern

On Unix, it is easy to get those lines that match a pattern, by grep pattern file or those lines that do not, by grep -v pattern file but I am editing a file on Windows with Ultraedit. Ultraedit support regular expression based search and replace. I can delete all the lines that match a... (1 Reply)
Discussion started by: JumboGeng
1 Replies

2. Shell Programming and Scripting

SED: match pattern & delete matched lines

Hi all, I have the following data in a file x.csv: > ,this is some text here > ,,,,,,,,,,,,,,,,2006/11/16,0.23 > ,,,,,,,,,,,,,,,,2006/12/16,0.88 < ,,,,,,,,,,,,,,,,this shouldnt be deleted I need to use SED to match anything with a > in the line and delete that line, can someone help... (7 Replies)
Discussion started by: not4google
7 Replies

3. Shell Programming and Scripting

sed print all lines after pattern match

HiCan someone show me how to print all lines from a file after a line matching a pattern using sed?Thanks (13 Replies)
Discussion started by: steadyonabix
13 Replies

4. Shell Programming and Scripting

delete block of lines when pattern does not match

I have this input file that I need to remove lines which represents more than 30 days of processing. Input file: On 11/17/2009 at 12:30:00, Program started processing...argc=7 Total number of bytes in file being processed is 390 Message buffer of length=390 was allocated successfully... (1 Reply)
Discussion started by: udelalv
1 Replies

5. Shell Programming and Scripting

Delete lines line by match data 2 file.

i need to delete the lines is match from file data 1 & data 2 please help? data 1 4825307 4825308 4825248 4825309 4825310 4825311 4825336 data 2 4825248 0100362210 Time4Meal 39.00 41.73 MO & MT MT SMS 4825305 0100367565... (2 Replies)
Discussion started by: ooilinlove
2 Replies

6. Shell Programming and Scripting

Sed/awk to delete single lines that aren't touching other lines

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)
Discussion started by: slimjbe
6 Replies

7. Shell Programming and Scripting

Sed delete blank lines upto first pattern match

Hi Im trying to do the following in sed. I want to delete any blank line at the start of a file until it matches a pattern and then stops. for example: Input output: I have got it to work within a range of two patterns with the following: sed '/1/,/pattern/{/^]*$/d}' The... (2 Replies)
Discussion started by: duonut
2 Replies

8. UNIX for Dummies Questions & Answers

sed, join lines that do not match pattern

Hello, Could someone help me with sed. I have searched for solution 5 days allready :wall:, but cant find. Unfortunately my "sed" knowledge not good enough to manage it. I have the text: 123, foo1, bar1, short text1, dat1e, stable_pattern 124, foo2, bar2, long text with few lines, date,... (4 Replies)
Discussion started by: petrasl
4 Replies

9. Shell Programming and Scripting

sed read X lines after match

I want to do something like sed -n '/PATTERN/,+10p' and get the ten lines following PATTERN. However, this throws an "expected context address" with the sed that comes with OSX Lion. If that + is a GNUism, can I do this, or do I have to find another tool? (2 Replies)
Discussion started by: jnojr
2 Replies

10. Shell Programming and Scripting

Delete lines based on pattern match

BASH in Solaris 10 I have a log file like below. Whenever the pattern ORA-39083 is encountered, I want to delete the line which has this pattern and 3 lines below it. $ cat someLogfile.txt ORA-39083: Object type OBJECT_GRANT failed to create with error: ORA-01917: user or role 'CMPA' does... (4 Replies)
Discussion started by: kraljic
4 Replies
ROFFPP(1)						      General Commands Manual							 ROFFPP(1)

NAME
roffpp - replace .so requests within *roff sources SYNOPSIS
roffpp [ option... ][ infile [ outfile ]] roffpp -Help roffpp -VERSion DESCRIPTION
The roffpp command may be used to copies the input file to the output file, including files named using .so directives along the way, and removing the .so directives. This is useful when processing large multi-file documents with filters such as tbl(1) or eqn(1) which do not understand the .so directive. The .nx directive is not understood. The roffpp program is not a general *roff interpreter, so many constructs will be beyond it, fortunately, most of them have nothing to do with include files. Include files which cannot be found, probably from uninterpreted *roff constructs, if the files really does exist, will simply be passed through unchanged, for *roff to interpret at a later time. The roffpp program also allows the user to specify an include search path. This allows, for example, common files to be kept in a central location. Only directives of the form .so filename are processed. If the directive is introduced using the single quote form, or the dot is not the first character of the line, the directive will be ignored. Any extra arguments on the line are ignored, and quoting is not understood. All characters are interpreted literally. Examples of directives which will be ignored include 'so /usr/lib/tmac/tmac.an .if n .so yuck This list is not exhaustive. The special file name `-' on the command line means the standard input or standard output, as appropriate. Files which are omitted are also assumed to be the standard input or standard output, as appropriate. The output attempts to keep file names and line numbers in sync by using the .lf directive. The .lf directive is also understood as input. This is compatible with groff(1) and the other GNU text utilities included in the groff package. OPTIONS
The following options are understood. -Ipath Specify include path, a la cc(1). Include paths are searched in the order specified. The include search path defaults to the current directory if and only if the user does not specify any include search paths. -Help Give information on how to use roffpp. -VERSion Tell what version of roffpp is being run. Any other option will generate a diagnostic error. All options may be abbreviated; the abbreviation is documented as the upper case letters, all lower case letters and underscores (_) are optional. You must use consecutive sequences of optional letters. All options are case insensitive, you may type them in upper case or lower case or a combination of both, case is not important. For example: the arguments "-help", "-HEL" and "-h" are all interpreted to mean the -Help option. The argument "-hlp" will not be understood, because consecutive optional characters were not supplied. Options and other command line arguments may be mixed arbitrarily on the command line. The GNU long option names are understood. Since all option names for roffpp are long, this means ignoring the extra leading '-'. The "--option=value" convention is also understood. EXIT STATUS
The roffpp command will exit with a status of 1 on any error. The roffpp command will only exit with a status of 0 if there are no errors. COPYRIGHT
roffpp version 2.33 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Miller The roffpp program comes with ABSOLUTELY NO WARRANTY; for details use the 'roffpp -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'roffpp -VERSion License' command. AUTHOR
Peter Miller E-Mail: pmiller@opensource.org.au //* WWW: http://miller.emu.id.au/pmiller/ Reference Manual Cook ROFFPP(1)
All times are GMT -4. The time now is 05:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy