I want to be able to easily transport certain profiles of my gnome-terminal to another computer by using a sort of regex and filtering for the name. grep
doesn't allow searching between newlines and I'm hoping awk
(Technically mawk
on Ubuntu) has that functionality. A profile looks like this:
[:c812de27-9bc9-414b-a263-4995c1ec775a]
background-color='rgb(31,36,40)'
palette=['rgb(106,115,125)', ...array of colors]
scroll-on-output=true
scrollbar-policy='never'
use-theme-colors=false
use-theme-transparency=false
visible-name='gh_dark'
These profiles are split by newlines when dumped via dconf
So far I've tried grep
, but since that doesn't allow matching newlines (I found out after trying grep "[:.*].*visible-name:'gh_dark'"
), I can't scope out several. I looked into the -A
flag, but since there is no way to know how many lines a specific profile will be, it doesn't seem practical.
What I sort of want, given the name, is output like above where it is easy to see the full profile configuration
I want to know if there's a way to use awk
to easily sort through these by grabbing the ids (at the top) along with the names to easily figure out which ones to export individually (which require ids) or just pull them out directly and place them in a file
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…