2

How do I check whether I already have a certain ppa in my list? How do I search through my list of ppas?

842Mono
  • 10,070

1 Answers1

3

This can be achieved with an altered version of the script which can be found here.

#! /bin/sh 
find /etc/apt/ -name '*.list' | while read -r apt do
    grep -o "^deb http://ppa.launchpad.net/[a-z0-9\-]\+/[a-z0-9\-]\+" "$apt" | 
        while read entry ; do
            user=$(echo "$entry" | cut -d/ -f4)
            ppa=$(echo "$entry" | cut -d/ -f5)
            echo "ppa:$user/$ppa" | grep "$1"
        done
done

So in order to search for PPAs which contain a certain string run it as follows (in this example I have assumed that you have saved the file as searchPPAs and have also made it executable (chmod +x searchPPAs — make sure you do this in the same directory you save the file in)):

./searchPPAs <stringToSearchFor>
muru
  • 207,228