0

I tried to add some string between strings. I want to add "themev2" to

<SEC_FLOATING_FEATURE_COMMON_CONFIG_CHANGEABLE_UI></SEC_FLOATING_FEATURE_COMMON_CONFIG_CHANGEABLE_UI>

so that the result is

<SEC_FLOATING_FEATURE_COMMON_CONFIG_CHANGEABLE_UI>themev2</SEC_FLOATING_FEATURE_COMMON_CONFIG_CHANGEABLE_UI>

I tried to use

lama="<SEC_FLOATING_FEATURE_COMMON_CONFIG_CHANGEABLE_UI></SEC_FLOATING_FEATURE_COMMON_CONFIG_CHANGEABLE_UI>"
baru="<SEC_FLOATING_FEATURE_COMMON_CONFIG_CHANGEABLE_UI>themev2</SEC_FLOATING_FEATURE_COMMON_CONFIG_CHANGEABLE_UI>
sed -i 's/$lama/$baru/g' /system/etc/floating_feature.xml;

But it does not work :(

4
  • 1
    if you're playing with xml, then use xmlstarlet which is the right tool for the job Commented Jan 29, 2018 at 12:43
  • you will have to use a backslash when using sed with special characters like < and >. So use \< and \> instead of directly putting the angle brackets. Commented Jan 29, 2018 at 12:52
  • 1
    @LohitGupta That is completely wrong. Commented Jan 29, 2018 at 12:52
  • @sjsam i want to execute that script in TWRP Recovery at android, supported format is .sh anyclue please? Commented Jan 29, 2018 at 15:05

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.