I want replace string <enclosure>"</enclosure> with <enclosure>^</enclosure> in xml
I have xml files with with extension .ktr in subfolders
i want to replace the string
with
i have written logic but it is not working correctly
out put coming like this
but i want like this
Last edited by Scrutinizer; 09-08-2018 at 05:13 AM..
Reason: Code tags
You need to escape the ampersand on the RHS:
Because it has a special meaning in the s command within sed.
--
Note:
If you choose a different delimiter you do not need to escape the hashes, for example:
One could also use back references ( \1 and \2 ) in this case:
Then you do not need to escape the ampersand, because it is not there
One could even use the backreference on the LHS:
But IMO that does not look very readable..
Last edited by Scrutinizer; 09-08-2018 at 06:49 AM..
Hi all,
How to view more info about this error message that i am keep on getting.
Tried "errpt -a" but the output is huge.
Thanks in advance! (2 Replies)
System: PowerPC_POWER6
OS: AIX 5.x
I was told that a disk (hdisk 10) is bad. How can I find "the serial # of the storage enclosure" from command line? How do I find which disk is on which enclosure?
Thank you in advance! :)
---------- Post updated at 12:33 PM ---------- Previous update... (2 Replies)
Hello All
I have a xml file with many sets of records
like this
<mytag>mydata</mytag>
<tag2>data&</tag2>
also same file can be like this
<mytag>mydata</mytag>
<tag2>data&</tag2>
<tag3>data2&data3</tag3>
Now i can grep & and replace with & for whole file but it will replace all... (4 Replies)
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Can anyone guide me on how to build my own NAS ? I have an old laptop that I want to convert into a NAS, but not use the laptop as such as an NAS because it has some problems. I would like to build a NAS like the ones available in market.
I do not want to buy a NAS enclosure , but would like to... (3 Replies)