Sponsored Content
Full Discussion: SED, match a line block
Top Forums Shell Programming and Scripting SED, match a line block Post 302421981 by RobertFord on Monday 17th of May 2010 08:09:50 AM
Old 05-17-2010
ok ! Thanks for the fast answer.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed - Replace Line which contains the Pattern match with a new line

I need to replace the line containing "STAGE_DB" with the line "STAGE_DB $DB # database that contains the table being loaded ($workingDB)" Here $DB is passed during the runtime. How can I do this? Thanks, Kousikan (2 Replies)
Discussion started by: kousikan
2 Replies

2. Shell Programming and Scripting

Multiple line match using sed

Please help! Input pattern, where ... could be any number of lines struct A { Blah1 Blah2 Blah3 ... } B; output pattern struct AB { Blah1 Blah2 Blah3 ... }; I need help in extracting everything between { and } if it would have been on a single line { \(.*\)} should have worked. (15 Replies)
Discussion started by: SiftinDotCom
15 Replies

3. Shell Programming and Scripting

sed: find match and delete the line above

I am searching a dhcpd.conf to find the hardware ethernet match, then once the match is found delete just the line above it. For example: testmachine.example { hardware ethernet 00:00:00:00:00:00; fixed address 192.168.1.100; next-server 192.168.1.101; filename "linux-install/pxelinux.0"; }... (3 Replies)
Discussion started by: cstovall
3 Replies

4. Shell Programming and Scripting

SED - adding blank line after each Range Match

the following range matching works great but i wish to add a blank line after each range result set... which i've tried and researched to no avail MY INPUT DATA: CURRENT CODE I'M USING: sed -n '/*$/,/;/p' $INPUT_FILE RESULTS I'M GETTING: RESULT I looking to... (5 Replies)
Discussion started by: danmauer
5 Replies

5. Shell Programming and Scripting

Sed scripting, match text within line and replace

New to sed... Have a file foo.txt (below). Need to replace text on 2 lines, but can only feed sed the first few characters of each line (all lines are unique). So, in my example, I have put '$' in place of what I need to figure out how to feed the whole line. What I have thus far: sed -e... (6 Replies)
Discussion started by: boolean2222
6 Replies

6. Shell Programming and Scripting

SED - Match a line from a File

Hi, I want to match a line which exists in a file. I have written a test script similar to below - The content of the file file.txt would be like this - /usr/bin/1234.xcf /usr/bin/3456.xcf /usr/bin/7897.xcf /usr/bin/2345.xcf out=`sed -n '\/usr\/bin\/7897.xcf/p' file.txt 2>&1`... (3 Replies)
Discussion started by: angshuman_ag
3 Replies

7. Shell Programming and Scripting

Using sed to pattern match within a particular multiline block and take action

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)
Discussion started by: tirodad
5 Replies

8. Shell Programming and Scripting

I need to know how to replace a line after a pattern match with an empty line using SED

Hi How Are you? I am doing fine! I need to go now? I will see you tomorrow! Basically I need to replace the entire line containing "doing" with a blank line: I need to the following output: Hi How Are you? I need to go now? I will see you tomorrow! Thanks in advance.... (1 Reply)
Discussion started by: sags007_99
1 Replies

9. Shell Programming and Scripting

Awk-sed help : to remove first and last line with pattern match:

awk , sed Experts, I want to remove first and last line after pattern match "vg" : I am trying : # sed '1d;$d' works fine , but where the last line is not having vg entry it is deleting one line of data. - So it should check for the pattern vg if present , then it should delete the line ,... (5 Replies)
Discussion started by: rveri
5 Replies

10. Shell Programming and Scripting

Grep or sed - printing line only with exact match

Hello. In my script, some command return : q | kernel-default | package | 3.19.0-1.1.g8a7d5f9 | x86_64 | openSUSE-13.2-Kernel_stable_standard | kernel-default | package | 3.19.0-1.1.g8a7d5f9 | i586 | openSUSE-13.2-Kernel_stable_standard | kernel-default ... (3 Replies)
Discussion started by: jcdole
3 Replies
Apache::XMLRPC(3pm)					User Contributed Perl Documentation				       Apache::XMLRPC(3pm)

NAME
Apache::XMLRPC - serve XML-RPC requests from Apache SYNOPSIS
## ## Directives for your Apache config file. ## <Location /RPC2> SetHandler perl-script PerlHandler Apache::XMLRPC PerlSetVar XMLRPC_Config /usr/local/apache/xml-rpc/services </Location> ## ## In the 'services' file referenced above by 'XMLRPC_Config' ## sub foo { ... } sub bar { ... } $map = { foo => &foo, bar => &bar, }; 1; DESCRIPTION
Apache::XMLRPC serves Userland XML-RPC requests from Apache/mod_perl using the Frontier::RPC2 module. Configuring Apache::XMLRPC to work under mod_perl is a two step process. First, you must declare a "<Location>" directive in your Apache configuration file which tells Apache to use the content handler found in the Apache::XMLRPC module and defines a variable which tells the module where to find your services. Then, you must define the services. Apache Configuration Apache configuration is as simple as the "<Location>" directive shown in the synopsis above. Any directive allowed by Apache inside a "<Location>" block is allowed here, but the three lines shown above are required. Pay close attention to the 'PerlSetVar XMLRPC_Config ...' line as this is where you tell Apache where to find your services. This file may reside anywhere accessible by Apache. Defining Services To actually define the XML-RPC routines that will be served, they must reside in the file referenced by the 'PerlSetVar XMLRPC_Config ...' directive in the Apache configuration file. In this file you may place as many Perl subroutines as you like, but only those which are explicitly published will be available to your XML-RPC clients. To publish a subroutine, it must be included in the hash reference named $map (the hash reference must have this name as this is the variable that the Apache::XMLRPC passes to Frontier::RPC2::serve to actually service each request) The hash reference must be defined in this "services" file. The keys of the hash are the service names visible to the XML-RPC clients while the hash values are references to the subroutines you wish to make public. There is no requirement that the published service names match those of their associated subroutines, but it does make administration a little easier. SEE ALSO
perl(1), Frontier::RPC2(3) <http://www.scripting.com/frontier5/xml/code/rpc.html> AUTHOR
Ed Hill <ed-hill@uiowa.edu> is the original author. Tim Peoples <tep@colltech.com> added a few tweaks and all the documenation. perl v5.10.1 2011-04-05 Apache::XMLRPC(3pm)
All times are GMT -4. The time now is 04:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy