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 anything else.
Hello!
i wanna match in a config file, one text with more than one lines, something like this:
CACHE_SIZE{
10000 M
}
I have problems with the ends of line, i think that i can match the end of the line with \n, but i can't get it
Someone can help me with the regular expression?
... (18 Replies)
Hi friends,
Could you please help me to resolve the below issue.
Input file :-
<Node>
<username>abc</username>
<password>ABC</password>
<Node>
<Node>
<username>xyz</username>
<password>XYZ</password>
<Node>
<Node>
<username>mnp</username>
... (3 Replies)
Hi all, hoping this is a simple one, tried looking but just can't see the solution
As an example I've got a list of words that all start Ben.....
Bendicks
Benefiber
Ben
Benylin
I need to only change the line Ben with Ben 10, ignoring the other lines.
I tried the following
... (1 Reply)
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)
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)
Hi all,
This is my first post, so please go easy if I broke some rules. Not accustomed to posting in forums... :)
I'm looking for help on pattern matching within a multiline block and looking to highlight blocks/block-ids that do NOT contain a particular pattern.
For example an input file... (5 Replies)
Ive used this snippet of code on a solaris box thousands of times.
But it isnt working on the new linux box
sed -n '/interface LoopBack0/{N;/ ip address /p;}' *.conf
its driving me nuts !!
Is there something Im missing ? (7 Replies)
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)
Input: START
OS:: UNIX
Release: xxx
Version: xxx
END
START
OS:: LINUX
Release: xxx
Version: xxx
END
START
OS:: Windows
Release: xxx
Version: xxx
ENDHere i am trying to get all the information between START and END, only if i could match OS Type.
I can get all the data between the... (3 Replies)
Discussion started by: Dharmaraja
3 Replies
LEARN ABOUT REDHAT
svnpath
SVNPATH(1)SVNPATH(1)NAME
svnpath - output svn url with support for tags and branches
SYNOPSIS
svnpath
svnpath tags
svnpath branches
svnpath trunk
DESCRIPTION
svnpath is intended to be run in a Subversion working copy.
In its simplest usage, svnpath with no parameters outputs the svn url for the repository associated with the working copy.
If a parameter is given, svnpath attempts to instead output the url that would be used for the tags, branches, or trunk. This will only
work if it's run in the top-level directory that is subject to tagging or branching.
For example, if you want to tag what's checked into Subversion as version 1.0, you could use a command like this:
svn cp $(svnpath) $(svnpath tags)/1.0
That's much easier than using svn info to look up the repository url and manually modifying it to derive the url to use for the tag, and
typing in something like this:
svn cp svn+ssh://my.server.example/svn/project/trunk svn+ssh://my.server.example/svn/project/tags/1.0
svnpath uses a simple heuristic to convert between the trunk, tags, and branches paths. It replaces the first occurrence of trunk, tags, or
branches with the name of what you're looking for. This will work ok for most typical Subversion repository layouts.
If you have an atypical layout and it does not work, you can add a ~/.svnpath file. This file is perl code, which can modify the path in
$url. For example, the author uses this file:
#!/usr/bin/perl
# svnpath personal override file
# For d-i I sometimes work from a full d-i tree branch. Remove that from
# the path to get regular tags or branches directories.
$url=~s!d-i/(rc|beta)[0-9]+/!!;
$url=~s!d-i/sarge/!!;
1
LICENSE
GPL version 2 or later
AUTHOR
Joey Hess <joey@kitenet.net>
Debian Utilities 2013-12-23 SVNPATH(1)