Sponsored Content
Top Forums Shell Programming and Scripting sed : match one pattern then the next consecutive second pattern not working Post 302824257 by popeye on Thursday 20th of June 2013 12:59:35 PM
Old 06-20-2013
sed : match one pattern then the next consecutive second pattern not working

Ive used this snippet of code on a solaris box thousands of times.
But it isnt working on the new linux box

Code:
sed -n '/interface LoopBack0/{N;/ ip address /p;}' *.conf

its driving me nuts !!

Is there something Im missing ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Match a pattern starting with sub-pattern using sed

Hi all, I've been experiencing a difficulty trying to match a number and write it to a new file. My input file is: input.txt It contains the lines: 103P 123587.256971 3.21472112 3.1517423 1.05897234566427 58.2146258 12.35478 25.3612489 What would be the sed command to... (17 Replies)
Discussion started by: Biederman
17 Replies

2. Shell Programming and Scripting

Sed Pattern Match

Hi, I would like to use SED to do the following string replacement: asd1abc to www1cda asd2abc to www2cda ... asd9abc to www9cda I can use 'asd.abc' to find the orignal string, however I don't know how to generate the target string. Any suggestion? Thanks, ... (2 Replies)
Discussion started by: mail4mz
2 Replies

3. Shell Programming and Scripting

Need one liner to search pattern and print everything expect 6 lines from where pattern match made

i need to search for a pattern from a big file and print everything expect the next 6 lines from where the pattern match was made. (8 Replies)
Discussion started by: chidori
8 Replies

4. UNIX for Dummies Questions & Answers

sed multiline pattern match

How can I write a script that takes a cisco config file and outputs every occurrence of two, or more, pattern matches through the whole config file? For example, out of a config file, i want to print out every line with interface, description and ip address through the whole file, and disregard... (3 Replies)
Discussion started by: knownasthatguy
3 Replies

5. Shell Programming and Scripting

How to insert line with between two consecutive lines that match special pattern?

I have following pattern in a file: 00:01:38 UTC abcd 00:01:48 UTC 00:01:58 UTC efgh 00:02:08 UTC 00:02:18 UTC and I need to change something like the following 00:01:38 UTC abcd 00:01:48 UTC XXXX 00:01:58 UTC efgh 00:02:08 UTC XXXX (6 Replies)
Discussion started by: jjnight
6 Replies

6. UNIX for Dummies Questions & Answers

Match Pattern after certain pattern and Print words next to Pattern

Hi experts , im new to Unix,AWK ,and im just not able to get this right. I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
Discussion started by: 100bees
2 Replies

7. Shell Programming and Scripting

Rearrange or replace only the second line after pattern match or pattern match

Im using the command below , but thats not the output that i want. it only prints the odd and even numbers. awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}' Im hoping for something like this file1: Text hi this is just a test text1 text2 text3 text4 text5 text6 Text hi... (2 Replies)
Discussion started by: invinzin21
2 Replies

8. Shell Programming and Scripting

Match Pattern and print pattern and multiple lines into one line

Hello Experts , require help . See below output: File inputs ------------------------------------------ Server Host = mike id rl images allocated last updated density vimages expiration last read <------- STATUS ------->... (4 Replies)
Discussion started by: tigerhills
4 Replies

9. Shell Programming and Scripting

Pattern match with awk/sed - help

I need to grep for the pattern text inside the square brackets which are in red and not in green..my current code greps patterns both of them, which i don't want Input fileref|XP_002371341.1| oxoacyl-ACP reductase, putative gb|EPT24759.1| 3-ketoacyl-(acyl-carrier-protein) reductase ... (2 Replies)
Discussion started by: selvankj
2 Replies

10. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies
QVBoxLayout(3qt)														  QVBoxLayout(3qt)

NAME
QVBoxLayout - Lines up widgets vertically SYNOPSIS
#include <qlayout.h> Inherits QBoxLayout. Public Members QVBoxLayout ( QWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 ) QVBoxLayout ( QLayout * parentLayout, int spacing = -1, const char * name = 0 ) QVBoxLayout ( int spacing = -1, const char * name = 0 ) ~QVBoxLayout () DESCRIPTION
The QVBoxLayout class lines up widgets vertically. This class is used to construct vertical box layout objects. See QBoxLayout for more details. The simplest use of the class is like this: QBoxLayout * l = new QVBoxLayout( widget ); l->addWidget( aWidget ); l->addWidget( anotherWidget ); <center> [Image Omitted] </center> See also QHBoxLayout, QGridLayout, the Layout overview, Widget Appearance and Style, and Layout Management. MEMBER FUNCTION DOCUMENTATION
QVBoxLayout::QVBoxLayout ( QWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 ) Constructs a new top-level vertical box called name, with parent parent. The margin is the number of pixels between the edge of the widget and its managed children. The spacing is the default number of pixels between neighboring children. If spacing is -1 the value of margin is used for spacing. QVBoxLayout::QVBoxLayout ( QLayout * parentLayout, int spacing = -1, const char * name = 0 ) Constructs a new vertical box called name name and adds it to parentLayout. The spacing is the default number of pixels between neighboring children. If spacing is -1, this QVBoxLayout will inherit its parent's spacing(). QVBoxLayout::QVBoxLayout ( int spacing = -1, const char * name = 0 ) Constructs a new vertical box called name name. You must add it to another layout. The spacing is the default number of pixels between neighboring children. If spacing is -1, this QVBoxLayout will inherit its parent's spacing(). QVBoxLayout::~QVBoxLayout () Destroys this box layout. The layout's widgets aren't destroyed. SEE ALSO
http://doc.trolltech.com/qvboxlayout.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qvboxlayout.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QVBoxLayout(3qt)
All times are GMT -4. The time now is 02:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy