1

I have a file that contains:

[Settings]
gtk-theme-name = Arc
gtk-icon-theme-name = Luv

I am trying to replace the 3rd line so that "Luv" will say somethig else. I tried with this command:

sed -r "3 s/.*/gtk-icon-theme-name = $SELECTED/" ~/.config/gtk-3.0/settings.ini

However, the output gets shown in my terminal and doesn't actually change the file at all. The variable is set by a previous command, btw (trying to write a script to change gtk3 icons for *box users).

Thanks a ton to whoever helps!

ovine
  • 109

1 Answers1

0

Figured it out. Apparently I need to include the -i flag to actually edit the file. So I am using -ri instead of -r now and it works.

Hope this helps someone out there. Found the answer from heemayl, of course. You rock.

ovine
  • 109