HI ,
I can't find a solution to the following:
In a simple menu script I want to capture the input from the user with "read" and use it as a value in a variable Rempages="some_value" which is in a different script file.
So I have to perform a search and replace for this variable and only replace its value.
How can that be done?
The only part that bothers me is the Search and
Hello,
I am using sed in a for loop to replace text in a 100MB file. I have about 55,000 entries to convert in a csv file with two entries per line. The following script works to search file.txt for the first field from conversion.csv and then replace it with the second field. While it works fine, it takes quite some time to run.
15 for(i = 0; i < N; i++)
I want to replace "i" with "test" in the line above,whose line number is 15.
When I tried this command
:15s/i/test/
Line 15 turned to be this:
for(test = 0; i < N; i++)
It only replace the first "i",but I want to change all "i" in line 15.
Any help will be appreciated.
I need a utility which will scan in a text file and search and replace strings. I also want to keep track of how many strings I've replaced. The following is an example paragraph and which text to replace.
"Bill Gates" with "Mr. Noodles",
"Gates" with "Noodles",
Hi Guys,
I have a file with following content
Code:
From 20121014 : To 20121014
Number of days : 1
1234
1245
1246
1111
Everyday i run my script i want to modify "To" date on the first line with current date. I have set the current date in script as
Code:
RUN_DATE=`date -u +%Y%m%d`
So i want to replace "To" date with $RUN_DATE.
Hi Folks,
I have an html file which contains the below line in the body tagI am trying the replace hello with Hello Giridhar programatically.
Code:
<body>
<P><STRONG><FONT face="comic sans ms,cursive,sans-serif"><EM>Hello</EM></FONT></STRONG></P>
</body>
I have written the below code to replace the string and I am able t
Code:
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:
Code:
Hi How Are you?
I need to go now?
I will see you tomorrow!
Thanks in advance....
Hi All,
How can i find and replace the one path to another path with in the file.
For Example:
Code:
Search_path=/search/path
replace_path=/replace/path
I used the following command but not usefull, please help me regarding the same.
Code:
sed 's_/search/path_/replace/path_' file_name > tmp_file.txt
Hi,
I am looking for assistance over shell or perl (without XML twig module) which replace string in XML file under particular branch..example of code file sample..
Exact requirment : Replace "Su saldo es" in below file with "Your balance" but only in XML branch of Text id=98 and Text Id=12 Not globally.
==
HTML Code:
<Text Id="98">
<Language id=&quo