Essentially I’m trying to update mirrors for my CachyOS repos via rate-mirrors and to just do it via one alias (like I do for EOS and Chaotic-AUR), however the sed -i parts of both aliases do not work and are need to tell the repos to get the x86_64_v3/v4 packages. I was wandering if there was an alternative to sed or and thing else.
alias cachyos-mirrors="rate-mirrors cachyos | sudo tee /etc/pacman.d/cachyos-mirrorlist \
&& sudo tee /etc/pacman.d/cachyos-v3-mirrorlist /etc/pacman.d/cachyos-v4-mirrorlist < /etc/pacman.d/cachyos-mirrorlist >/dev/null;" \
sudo sed -i 's|/repo/$arch/|/repo/$arch_v3/|g' /etc/pacman.d/cachyos-v3-mirrorlist \
&& sudo sed -i 's|/repo/$arch/|/repo/$arch_v4/|g' /etc/pacman.d/cachyos-v4-mirrorlist"
alias sed_test="sudo sed -i 's|/repo/$arch/|/repo/$arch_v3/|g' /etc/pacman.d/cachyos-v3-mirrorlist && sudo sed -i 's|/repo/$arch/|/repo/$arch_v4/|g' /etc/pacman.d/cachyos-v4-mirrorlist"