Search Results

Search: Posts Made By: abhitanshu
2,573
Posted By abhitanshu
Hey thanks. My mistake. i was referring to some...
Hey thanks. My mistake. i was referring to some other file. It worked.
:)

Would you mind just trying one more problem i am facing....
2,573
Posted By abhitanshu
sed '3r file2' file1 This command is replacing...
sed '3r file2' file1
This command is replacing the text.

But i want the text to be inserted.
2,573
Posted By abhitanshu
How to insert text using a second file in Linux
How can i insert text at a particular line number or before/after a search pattern? The text i want to insert is of 8-10 lines including new line characters. I have stored this text in a separate...
1,696
Posted By abhitanshu
Sorry it did not work. I got gIntegraHost...
Sorry it did not work.

I got gIntegraHost everywhere. It did not get replaced at all. I want gIntegraHost to be replaced with gTestRunHost only where there in curl between<TCPSampler and...
1,696
Posted By abhitanshu
I am using Red hat Linux 6.2. Sample Input...
I am using Red hat Linux 6.2.

Sample Input is -
<TCPSampler guiclass="TCPSamplerGui" testclass="TCPSampler" testname="Req Request" enabled="true">
<stringProp...
1,696
Posted By abhitanshu
Problem while replacing text between two tags
Hi,
I have a file i which i want to replace {gIntegraHost} to {gTestRunHost} between <TCPSampler and curl only.
I am firing below command
sed '1,/<TCPSampler/!{...
15,754
Posted By abhitanshu
Thanks Bala. But can't we do this in shell or...
Thanks Bala. But can't we do this in shell or using sed?
15,754
Posted By abhitanshu
Hi Bala, In a xml file i need to replace value...
Hi Bala,
In a xml file i need to replace value of HTTPSampler.proxyHost with ${gProxyHost}. But this has to be between the tags HttpDefaultsGui.*enabled="true" and /ConfigTestElement.

My above...
15,754
Posted By abhitanshu
I am doing a kind of complex find and replace and...
I am doing a kind of complex find and replace and i need no of count of that replacement.

sed '/HttpDefaultsGui.*enabled="true"/,/<\/ConfigTestElement/...
15,754
Posted By abhitanshu
How to get count of replacements done by sed?
Hi ,
How can i get count of replacements done by sed in a file.
I know grep -c is a method.
But say if sed had made 10 replacement in a file, can i get number 10 some how?
2,446
Posted By abhitanshu
Block of text replacement using sed
Hi,
I have a requirement in which i need to replace text as below -

<stringProp name="Recipe">&lt;AddGroup Name=&quot;1001&quot; Path=&quot;ServiceAdministration/Controls/1001/ServiceSwitches&quot;&gt;
&lt;Param...
1,070
Posted By abhitanshu
Obviously its work related question. I just...
Obviously its work related question.
I just simplified it so that it'll be easy to understand and try i take the clue and apply it.
1,070
Posted By abhitanshu
How to replace a text containing new lines using sed or any other method?
Hi,
i want to replace
"Hi How
are You when
did you go to
delhi"

to
"Hi How
are you when
did you come from
delhi"

in a file.

Any idea how to do it?
17,080
Posted By abhitanshu
I am using red hat 6.1 and bash shell. I...
I am using red hat 6.1 and bash shell.

I want comparison for greater than or equal to and one of the variable has 3 parts like 1.9.2 which shall be compared with 2.0 for example.
17,080
Posted By abhitanshu
How to compare version values in shell script?
Hi,
I need to compare two versions values and report only true or false depending on their difference result.

like -
echo $(echo "1.8 >= 2.0" | bc)
0

echo $(echo "2.0 >= 2.0" | bc)
1
but...
1,106
Posted By abhitanshu
hey thanks. It worked
hey thanks. It worked
1,106
Posted By abhitanshu
how to replace a text in a file from second file in shell
Hi,
I have file 1 say
abc abcd
abc abcd <some tag> xyx
abcd xyz
abc abcd <some tag> xyx
xyz abc

And i have another file say file 2 -
replaced tag1
replaced tag2

Now i want to put value...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 12:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy