Input File:
somechangeVariable1=Something I would like to change
somechangeVariable2=Something else I would like to change
...
Output File:
somechangeVariable1=Something I would like to different
somechangeVariable2=Something else I would like to different
...
...
How do I run the substitute on \2 alone?
I realize that I can use other tools but would like to solve this with sed as more of a theoretical exercise at this point.
...
I am having a problem executing a sed substitute in a file. I have tried alot of different things I found in previous posts, however non seem to work.
I want to substitute this in $FILE:
VALUE=33.4
In the script I have tried the following:
prev=$(awk -F"=" '{ print $2 }' $FILE )
new=$(echo... (16 Replies)
Hi All,
I'm currently using SED to make various changes to some .xml files I'm working on, but I'm stuck on this particular problem.
I want to remove '<placeholder>element-name</placeholder>' from the following:
<heading>Element <placeholder>element-name</placeholder> not... (2 Replies)
I am trying to get rid of some ending tags but I run into some problems.
Ex.
How are you?</EndTag><Begin>It is fine.</Begin><New> Just about
I am trying to get rid of the ending tags, starts with </ and ending with >. (which is </EndTag> and </Begin>)
I tried the following
sed... (2 Replies)
I'm using sed to perform a simply search and replace. The typical data is:
<fig><image href="Graphics/BAV.gif" align="left" placement="break"
I need to replace the value in the first set of quotes, keeping the remainder of the line the same. Thus:
<fig><image href="NEW_VALUE" align="left"... (3 Replies)
Is there a way to substitute the URL-encoding references of ( & and ` ) with their actual appearance? for example....
%26 is &
say I want to convert every %26 in my file to &.....
awk '{gsub(/%26/,"&");print}'
Is there a way to do this?
I also want to be able to convert ` too! (3 Replies)
using awk to substitute data in a column delimited text file
hello i would like to use awk to do the following calculation from the following snippet.
input file
C;2390 ;CV BOUILLOTTE 2L 2FACES NERVUREES ;1.00 ;3552612239004;13417 ;25 ;50 ; 12;50000 ; ; ... (3 Replies)
Hello,
I have huge xml files and I need to replace only part of the data within a particular xml tag. This doesnt seem to be as simple as it sounds. I have searched everywhere and couldnt find any solution.
Ex:
In the below case I would like "def" to be replaced by "xyz" only when found in... (8 Replies)
I am trying to do what I thought should be a simple substitution, but I can't get it to work.
File:
Desire output:
I thought I'd start with a sed command to remove the part of the header line preceding the string "comp", then go on to remove the suffix of the target string (e.g. ":3-509(-)"),... (3 Replies)
Let me start off by saying I am a self taught sometimes scripter so what you will see below won't be pretty.
I have created a script to parse through a file with a large amount of data and simply pull out what I need. In doing this I create several files and then paste them together in order to... (2 Replies)