FORUMS
Post Reply Subscribe to Thread Email Thread

[Q] how to use a script to replace text in a file?

19th June 2014, 04:48 PM |#1  
OP Senior Member
Thanks Meter: 12
 
More
i want to use a script to change text in build.prop
the script has to look for:

ro.something: (text to change)

and change the (text to change)

how?
 
 
20th June 2014, 05:45 PM |#2  
shimp208's Avatar
Recognized Contributor
Flag Boston
Thanks Meter: 1,811
 
Donate to Me
More
Quote:
Originally Posted by washwash

i want to use a script to change text in build.prop
the script has to look for:

ro.something: (text to change)

and change the (text to change)

how?

One way would be to make use of the sed command in a script, coupled with other commands such as grep you can search for the property you want and replace the values of it once you find the property your looking for. I would recommend taking a look at the sed documentation, as well as this tool which does something similar to what you want to do.
The Following User Says Thank You to shimp208 For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes