Friday, May 3, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 523  / 2 Years ago, fri, september 30, 2022, 8:41:33

I need to add PPAs on Ubuntu 14.04.3 from a file that contains a list of repositories, as follows:



sudo add-apt-repository ppa: $ (cat ppas.list)


or



sudo add-apt-repository $ (cat ppas.list)


or yet



cat ppas.list | xargs sudo add-apt-repository


But these don't work and the following error appears: "Error: need a single repository as argument".



Can someone assist?


More From » command-line

 Answers
2

It works with the following command:



for i in $(cat ppas.list); do sudo add-apt-repository "$i"; done

[#16787] Sunday, October 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
darpose

Total Points: 424
Total Questions: 99
Total Answers: 121

Location: Jersey
Member since Fri, Oct 1, 2021
3 Years ago
;