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 <neil.greenwood....@gmail.com> wrote:

> On 4 May 2014 13:39:40 GMT+01:00, Joe Alam <yothsogg...@gmail.com> 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" <mfraz74+ubu...@gmail.com> 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/

Reply via email to