Sponsored Content
Top Forums Shell Programming and Scripting sed relacement of word after particular string in a file Post 302833999 by RudiC on Thursday 18th of July 2013 07:48:49 AM
Old 07-18-2013
So vidyadhar85's hope was in vain. Try
Code:
sed -e "s/$String/&\|$Url/g"


Last edited by RudiC; 07-18-2013 at 10:30 AM.. Reason: typo
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace a word with string from another file

Hi, this belongs a little to my other post but only at the starting point. With find -name "*.htm*" i got a list like this: ./1999/01/file1.html ./1999/01/file2.html ./1999/02/file1.html ./2000/04/file1.html ./2000/04/file2.html ./2000/04/file3.html ./2000/file1.html... (2 Replies)
Discussion started by: Tonda
2 Replies

2. Solaris

board relacement in solaris server

HI Can anyone clarify my doubt.V are using two SUN V890 servers.At present the board in t passive node is 1.5 ghz and due to over load we are plannin to remove the board from passive node and insert it in active node and then insert a 1.3ghz board in passive node..will it be possible if so... (3 Replies)
Discussion started by: madanmeer
3 Replies

3. 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

4. Shell Programming and Scripting

awk or sed command to print specific string between word and blank space

My source is on each line 98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Discussion started by: elamurugu
5 Replies

5. 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

6. 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

7. Shell Programming and Scripting

Using SED to extract a word or string.

I am working with the ksh shell in HP UNIX and I am attempting to extract a word, beginning with a particular string and ending at the first space. for example I want to extract the word or string MS_RECENT_ACTIVITY from the following string " This has been entered in MS_RECENT_ACTIVITY the... (2 Replies)
Discussion started by: simpletech369
2 Replies

8. Shell Programming and Scripting

sed command to remove a word from string

Hello All, I am running a command find . -name amp.cfg | cut -c 3- which gives me output something like below rel/prod/amp.cfg rel/fld/amp.cfg deb/detail/amp.cfg deb/err/amp.cfg I want to remove trailing "/amp.cfg" so that i should get output something like... (7 Replies)
Discussion started by: anand.shah
7 Replies

9. 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

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
DXmGetLocaleString(3X)													    DXmGetLocaleString(3X)

NAME
DXmGetLocaleString - Provides locale-sensitive Motif compound string version of Toolkit ASCII default values. SYNOPSIS
XmString DXmGetLocaleString( I18nContext context, char *string, I18nWordType word_type ); PARAMETERS
Reserved for future use. (Null value passed.) Null-terminated string specifying the ASCII string value whose locale sensitive version is to be retrieved (for example, the string "OK"). Specifies the type (part of speech) of a word in the string, as indicated by one of the following values: ------------------------------------------ Value Description ------------------------------------------ I18NADJECTIVE The word is an adjective. I18NADVERB The word is an adverb. I18NNOUN The word is a noun. I18NVERB The word is a verb. ------------------------------------------ DESCRIPTION
The DXmGetLocaleString routine provides a locale-sensitive Motif compound string version of Toolkit ASCII default values, such as "OK" or "Cancel". You can specify the part of speech (adjective, adverb, verb, or noun) associated with each word in the string. RETURN VALUES
A pointer to the Motif compound string containing the value. DXmGetLocaleString(3X)
All times are GMT -4. The time now is 02:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy