Sponsored Content
Top Forums Shell Programming and Scripting sed: replace string with another string (with spaces) Post 302333927 by zmfcat1 on Tuesday 14th of July 2009 10:23:47 AM
Old 07-14-2009
Thx Tony. Any other suggestions on this? Thx.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using sed to replace a string in file with a string in a variable that contains spaces

Hi, i call my shell like: my_shell "my project name" my script: #!/bin/bash -vx projectname=$1 sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp cp temp test_config_doxy the following error occurres: sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
2 Replies

2. Shell Programming and Scripting

Help with sed matching <tag1> newline spaces <tag2> and replace the value in the same string format

Hi, I'm very new to shell scripting and have searched google and this forum for quite some time now. I have the following in my xml file: <recipients> <member>value1</member> </recipients> I need to find a string <recipients> that follows with a new-line and bunch of spaces and... (5 Replies)
Discussion started by: mgharios
5 Replies

3. Shell Programming and Scripting

replace (sed?) a single line/string in file with multiple lines (string) from another file??

Can someone tell me how I can do this? e.g: Say file1.txt contains: today is monday the 22 of NOVEMBER 2010 and file2.txt contains: the 11th month of How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
5 Replies

4. Shell Programming and Scripting

replace (sed?) a string in file with multiple lines (string) from variable

Can someone tell me how I can do this? e.g: a=$(echo -e wert trewt ertert ertert ertert erttert erterte rterter tertertert ert) How do i replace the STRING with $a? I try this: sed -i 's/STRING/'"$a"'/g' filename.ext but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies

5. Shell Programming and Scripting

String replace that has spaces

cat rf|nawk '/Use SSL= 0/{n+=1}{if (n==3){sub("Use SSL= 0","Use SSL= 0x1",$0)};print }' > rf2Fails. sed 's/Use SSL= 0/Use SSL= 0x1/g' rf > rf2Fails. In addition, the goal is to ONLY replace the 2nd occurence of the... (15 Replies)
Discussion started by: rfransix
15 Replies

6. Shell Programming and Scripting

sed or awk command to replace a string pattern with another string based on position of this string

here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb cat dump.sql INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies

7. Shell Programming and Scripting

How to find and replace a string with spaces and / recursively?

Hi all, I wanted to find and replace an email id from entire directory structure on a Linux server. I found that find . -type f -print0 | xargs -0 sed -i 's/abc@yahoo.com/xyz@gmail.com/g' would do it perfectly. But my search criteria has extended and now I want to search for a string1 like... (2 Replies)
Discussion started by: pat_pramod
2 Replies

8. Shell Programming and Scripting

Replace string in XML file with awk/sed with string from another

Sorry for the long/weird title but I'm stuck on a problem I have. I have this XML file: </member> <member> <name>TransactionID</name> <value><string>123456789123456</string></value> </member> <member> <name>Number</name> ... (9 Replies)
Discussion started by: cozzin
9 Replies

9. UNIX for Dummies Questions & Answers

How do I replace a string in file that is in a certain position with spaces?

I am trying to replace the string in position 26 through 35 of the data file with 10 spaces and I want the remaining file to stay as is, the record length is over 900 characters? I am trying to use the AWK and substr but I am not getting it formatted correctly. Before... (6 Replies)
Discussion started by: fnwine1500
6 Replies

10. Shell Programming and Scripting

Replace string of a file with a string of another file for matches using grep,sed,awk

I have a file comp.pkglist which mention package version and release . In 'version change' and 'release change' line there are two versions 'old' and 'new' Version Change: --> Release Change: --> cat comp.pkglist Package list: nss-util-devel-3.28.4-1.el6_9.x86_64 Version Change: 3.28.4 -->... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
Munin::Node::Configure::Plugin(3pm)			User Contributed Perl Documentation		       Munin::Node::Configure::Plugin(3pm)

NAME
Munin::Node::Configure::Plugin - Class representing a plugin, along with its installed and suggested services. SYNOPSIS
my $plugin = Munin::Node::Configure::Plugin->new(); METHODS
new(%args) Constructor. Required arguments are 'name' and 'path', which should be the basename and full path of the plugin, respectively. is_wildcard() Returns true if the plugin is a wildcard. In the case of SNMP plugins, only double-wild plugins will return true (ie. 'snmp__memory' would return false, but 'snmp__if_' would return true). is_snmp() Returns true if the plugin is an SNMP plugin. in_family(@families) Returns true if plugin's family is in @families, false otherwise. is_installed() Returns 'yes' if one or more links to this plugin exist in the service directory, 'no' otherwise. suggestion_string() Returns a string detailing whether or not autoconf considers that the plugin should be installed. The string may also report the reason why the plugin declined to be installed, or the list of suggestions it provided, if this information is available. installed_services_string() Returns a string detailing which wildcards are installed for this plugin. services_to_add() services_to_remove() Return a list of service names that should be added or removed for this plugin. add_instance($name) Associates a link from the service directory with this plugin. add_suggestions(@suggestions) Adds @suggestions to the list of suggested wildcards for this plugin. They are not validated. read_magic_markers() Sets the family and capabilities from the magic markers embedded in the plugin's executable, as specified by http://munin-monitoring.org/wiki/ConcisePlugins#Magicmarkers <http://munin-monitoring.org/wiki/ConcisePlugins#Magicmarkers> parse_autoconf_response(@response) Parses and validates the autoconf response from the plugin, in the format specified by http://munin-monitoring.org/wiki/ConcisePlugins#autoconf <http://munin-monitoring.org/wiki/ConcisePlugins#autoconf> Invalid input will cause an error to be logged against the plugin. parse_suggest_response(@response) Validates the suggestions from the plugin. Invalid suggestions will cause an error to be logged against the plugin. parse_snmpconf_response(@response) Parses and validates the snmpconf response from the plugin, in the format specified by http://munin-monitoring.org/wiki/ConcisePlugins#suggest <http://munin-monitoring.org/wiki/ConcisePlugins#suggest> Invalid or inconsistent input will cause an error to be logged against the plugin. log_error($message) Logs an error for later retrieval. The error will also be displayed if debugging output is enabled. perl v5.14.2 2013-11-12 Munin::Node::Configure::Plugin(3pm)
All times are GMT -4. The time now is 06:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy