10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Everyone,
I want to find this 2 strings in a single line a file and replace the second string.
this is the line i need to find
<param name="user" value="CORE_BI"/>
find user and CORE_BI and replace only CORE_BI with admin
so finally the line should look like this.
<param... (5 Replies)
Discussion started by: shajay12
5 Replies
2. Shell Programming and Scripting
I am looking for a sed in which I can recognize all of the text in between two indicators and then replace it with a place holder.
For instance, the 1st indicator is a list of words "no|noone|havent" and the 2nd indicator is a list of punctuation ".|,|!".From a sentence such as
"noone... (3 Replies)
Discussion started by: owwow14
3 Replies
3. Windows & DOS: Issues & Discussions
so...
Lets assume I have a text file.
The text file contains multiple "#" symbols.
I want to replace all thos "#"s with a STRING using DOS/Batch
I want to add a certain TEXT to the end of each line.
How can I do this WITHOUT aid of sed, grep or anything linux related ? (1 Reply)
Discussion started by: pasc
1 Replies
4. Shell Programming and Scripting
Hi,
following Perl code i used for finding multiple strings and replace with single string.
code:
#!/usr/bin/perl
my @files = <*.txt>;
foreach $fileName (@files) {
print "$fileName\n";
my $searchStr = ',rdata\)' | ',,rdata\)' | ', ,rdata\)';
my $replaceStr =... (2 Replies)
Discussion started by: chettyravi
2 Replies
5. Shell Programming and Scripting
Hi i am having XML file with many number of lines,I need to replace between two strings with .txt file using awk.
For ex
<PersonInfoShipTo ------------------------------ />
My requirement is to replace the content between
<PersonInfoShipTo ------------------------------ />
help me.
Thanks... (9 Replies)
Discussion started by: Padmanabhan
9 Replies
6. Shell Programming and Scripting
I have a .txt contains a lot of lines.
Now I want to write a shell script to find out all the lines which contain the strings I want, and print these lines.
For example:
A.txt
when you post any code
you can easily do this
highlighting your code and then click
you should do a Google... (6 Replies)
Discussion started by: Henryyy
6 Replies
7. Shell Programming and Scripting
Hello everyone,
ive been trying to replace a string "kw01" in an xml file with the contents of a txt file having multiple lines. im a unix newbie and all the sed combinations i tried resulted to being garbled. Below is the contents of the txt file:
RAISEDATTIME
--------------------... (13 Replies)
Discussion started by: 4dirk1
13 Replies
8. Shell Programming and Scripting
Hi all,
I did not use UNIX for a long time, now i need to make a flat file with extra field, can you help me with the code ?
1. I create a last line of each log from each system and make it in a flat text file (seperate by a pipe |)
mv current.log old
tail -1 sanfrancisco.log > current.log... (5 Replies)
Discussion started by: britney
5 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
Iam new to unix, I need to find string and replace it in the file name. Like
text_123_0.txt,text_123_1.txt,text_123_2.txt. I need to search 123 and replace it with 234 . Is there any unix command to replace them in single command since i have 5 directories. So i need to go each and every... (0 Replies)
Discussion started by: etldeveloper
0 Replies
10. Shell Programming and Scripting
Friends,
I have a file with contents like:
interface Serial0/4/0/0/1/1/1/1:0
encapsulation mfr
multilink
group 101
interface Serial0/4/0/0/1/1/1/2:0
encapsulation ppp
multilink
group 101
I just have to repace mfr with ppp and ppp with mfr in a single shot.
I tried using... (4 Replies)
Discussion started by: shrijith1
4 Replies