Re: [ubuntu-uk] Comparing installed packages
On Monday 05 May 2014 11:45:10 Tony Pursell wrote: > Here is another idea. Run > > apt list --installed |cut -d/ -f1 -s > installed > > for all machines. Then use the join command (see the man page for options) > to make the table. Perhaps open the table in LibreOffice use text to table. > > Tony I've started to look at comm --output-delimiter=, installed1.txt installed2.txt >installed.csv -- Registered Linux User #466407 http://counter.li.org -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] Comparing installed packages
On Mon, 2014-05-05 at 15:42 +0100, David Goldsbrough wrote: > I'd be tempted to use diff. Try either man diff or info diff to learn > how > best to use it. > DaveG Or Meld perhaps? [Meld = graphical diff viewer] if you're that way inclined. ;) -- Bill B. [SuperEngineer] -- -Registered Linux User 523667- -Registered Ubuntu User 32366- -Free as in Freedom-- -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] Comparing installed packages
I'd be tempted to use diff. Try either man diff or info diff to learn how best to use it. DaveG > >Message: 1 > >Date: Sun, 04 May 2014 13:28:32 +0100 > >From: Mark Fraser > >To: ubuntu-uk@lists.ubuntu.com > >Subject: [ubuntu-uk] Comparing installed packages > >Message-ID: <1557956.Qkuynz4i5L@rachael> > >Content-Type: text/plain; charset="us-ascii" > > >I've got 4 computers here that I would like to compare the installed > >packages > >on each one together. I've done dpkg --get-selection > installed.txt on > >each > >computer, but now I'm trying to merge each one into a single file and > >leave a > >space where a package isn't installed. > > >Instead of: > >Acpi-support acpi-support Acpi-supportacpi-support > >adduser acroreadadduser > adduser > >Adobereader-enu acroread-binadobereader-enu adobereader-enu > > > > > >I'd like: > >Acpi-support acpi-support Acpi-supportacpi-support > > acroread > >acroread-bin > >adduser adduser > >adduser > >Adobereader-enu adobereader-enu > adobereader->enu > > >Any ideas how to achieve this? > > -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] Comparing installed packages
Here is another idea. Run apt list --installed |cut -d/ -f1 -s > installed for all machines. Then use the join command (see the man page for options) to make the table. Perhaps open the table in LibreOffice use text to table. Tony On 5 May 2014 09:07, Neil Greenwood wrote: > On 4 May 2014 13:39:40 GMT+01:00, Joe Alam wrote: > >Hi, > > > >There's probably a far better way that someone with some more > >experience > >will suggest, but the first thing that came to mind is to write a > >little > >program/script that does the following: > > > >- read all the files, into their own list of packages > >- combine the lists, filling a list of package names, sorted in > >alphabetical order and removing duplicates > >- iterate through the combined list, for each package check each of the > >four individual lists and if it is in there output it, otherwise leave > >a > >space > > > >That should achieve it in a fairly simple way, and can be done with any > >language. > > > >Best of luck, > >Joe > >On 4 May 2014 13:29, "Mark Fraser" wrote: > > > >> I've got 4 computers here that I would like to compare the installed > >> packages > >> on each one together. I've done dpkg --get-selection > installed.txt > >on > >> each > >> computer, but now I'm trying to merge each one into a single file and > >> leave a > >> space where a package isn't installed. > >> > >> Instead of: > >> Acpi-support acpi-support Acpi-support acpi-support > >> adduser acroread adduser > >> adduser > >> Adobereader-enu acroread-bin adobereader-enu adobereader-enu > >> > >> > >> I'd like: > >> Acpi-support acpi-support Acpi-support acpi-support > >> acroread > >> acroread-bin > >> adduser > >adduser > >> adduser > >> Adobereader-enu adobereader-enu > >> adobereader-enu > >> > >> Any ideas how to achieve this? > > My first idea was to try Libre Office Calc. Import the files into separate > sheets, cut 'n' paste to 4 columns on one sheet, scan down manually and > insert a cell where necessary. > > So it depends how good your scripting is whether you follow Joe's > suggestion, or go with the more manual process I've suggested. It also > depends how often you intend to do the process. If it's just a one-off, > don't script it unless you enjoy the challenge. > > I would also suggest ignoring the automatically installed dependencies > from the list of packages - "aptitude search ~i!?automatic" should do the > trick... > > Of course, if you are feeling particularly masochistic, you could try to > automate the whole thing in sed! :-) > > > > Neil. > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > -- > ubuntu-uk@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk > https://wiki.ubuntu.com/UKTeam/ > > -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] Comparing installed packages
On 4 May 2014 13:39:40 GMT+01:00, Joe Alam wrote: >Hi, > >There's probably a far better way that someone with some more >experience >will suggest, but the first thing that came to mind is to write a >little >program/script that does the following: > >- read all the files, into their own list of packages >- combine the lists, filling a list of package names, sorted in >alphabetical order and removing duplicates >- iterate through the combined list, for each package check each of the >four individual lists and if it is in there output it, otherwise leave >a >space > >That should achieve it in a fairly simple way, and can be done with any >language. > >Best of luck, >Joe >On 4 May 2014 13:29, "Mark Fraser" wrote: > >> I've got 4 computers here that I would like to compare the installed >> packages >> on each one together. I've done dpkg --get-selection > installed.txt >on >> each >> computer, but now I'm trying to merge each one into a single file and >> leave a >> space where a package isn't installed. >> >> Instead of: >> Acpi-support acpi-support Acpi-supportacpi-support >> adduser acroreadadduser >> adduser >> Adobereader-enu acroread-binadobereader-enu adobereader-enu >> >> >> I'd like: >> Acpi-support acpi-support Acpi-supportacpi-support >> acroread >> acroread-bin >> adduser >adduser >> adduser >> Adobereader-enu adobereader-enu >> adobereader-enu >> >> Any ideas how to achieve this? My first idea was to try Libre Office Calc. Import the files into separate sheets, cut 'n' paste to 4 columns on one sheet, scan down manually and insert a cell where necessary. So it depends how good your scripting is whether you follow Joe's suggestion, or go with the more manual process I've suggested. It also depends how often you intend to do the process. If it's just a one-off, don't script it unless you enjoy the challenge. I would also suggest ignoring the automatically installed dependencies from the list of packages - "aptitude search ~i!?automatic" should do the trick... Of course, if you are feeling particularly masochistic, you could try to automate the whole thing in sed! :-) Neil. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.-- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] Comparing installed packages
Hi, There's probably a far better way that someone with some more experience will suggest, but the first thing that came to mind is to write a little program/script that does the following: - read all the files, into their own list of packages - combine the lists, filling a list of package names, sorted in alphabetical order and removing duplicates - iterate through the combined list, for each package check each of the four individual lists and if it is in there output it, otherwise leave a space That should achieve it in a fairly simple way, and can be done with any language. Best of luck, Joe On 4 May 2014 13:29, "Mark Fraser" wrote: > I've got 4 computers here that I would like to compare the installed > packages > on each one together. I've done dpkg --get-selection > installed.txt on > each > computer, but now I'm trying to merge each one into a single file and > leave a > space where a package isn't installed. > > Instead of: > Acpi-support acpi-support Acpi-supportacpi-support > adduser acroreadadduser > adduser > Adobereader-enu acroread-binadobereader-enu adobereader-enu > > > I'd like: > Acpi-support acpi-support Acpi-supportacpi-support > acroread > acroread-bin > adduser adduser > adduser > Adobereader-enu adobereader-enu > adobereader-enu > > Any ideas how to achieve this? > -- > Registered Linux User #466407 http://counter.li.org > > -- > ubuntu-uk@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk > https://wiki.ubuntu.com/UKTeam/ > -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
[ubuntu-uk] Comparing installed packages
I've got 4 computers here that I would like to compare the installed packages on each one together. I've done dpkg --get-selection > installed.txt on each computer, but now I'm trying to merge each one into a single file and leave a space where a package isn't installed. Instead of: Acpi-support acpi-support Acpi-supportacpi-support adduser acroreadadduser adduser Adobereader-enu acroread-binadobereader-enu adobereader-enu I'd like: Acpi-support acpi-support Acpi-supportacpi-support acroread acroread-bin adduser adduser adduser Adobereader-enu adobereader-enu adobereader-enu Any ideas how to achieve this? -- Registered Linux User #466407 http://counter.li.org -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/