I'm trying to customize my pacman.conf file automatically when installing Arch with archiso.
For that, I want to uncomment two lines in the pacman configuration file.
Here is an extract from the file in question:
#[multilib-testing] #Include = /etc/pacman.d/mirrorlist #[multilib] #Include = /etc/pacman.d/mirrorlist
So I want to uncomment the two lines of the multilib block, but not the multilib-testing block!
To uncomment the first line of the block is easy with sed:
sed -i 's/#\[multilib]/\[multilib]/g' /etc/pacman.conf
However, the next line is exactly the same as the one in the previous block (and in many other blocks in practice), so if I do:
sed -i 's/#Include =/Include =/g' pacman.conf
It's going to change all the line matching the pattern.
What I want is to only change the specific line just after [multilib] How can I do that?