I am trying to modify the default ubuntu repositories in official-package-repositories.list in a script. I want to put a different mirror in, because archive.ubuntu.com is slow as _.
I've tried sed and awk, but i can't get the syntax right, or some process is not allowing it to be changed, or something.
The only way i've been able to do it is through echo | sudo tee -a, but that just appends the entries, and apt fails to read them, because there is some weird character right above my new entries.
What's the really right way to do this?
Thanks for your help.