Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Using sed to find and replace complex string (preferrably with regex)

sed -e '/username/s/CDATA[name]/CDATA[something]/' 
-e '/password/s/CDATA[password]/CDATA[somethingelse]/' 
-e '/dbname/s/CDATA[name]/CDATA[somethingdifferent]/' file.txt
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #Using #sed #find #replace #complex #string
ADD COMMENT
Topic
Name
1+6 =