Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #236281 > unrolled thread

question regarding post-installed packages

Started byChristian <abelschreck3@freenet.de>
First post2021-06-22 15:40 +0200
Last post2021-06-23 05:40 +0200
Articles 17 — 7 participants

Back to article view | Back to linux.debian.user


Contents

  question regarding post-installed packages Christian <abelschreck3@freenet.de> - 2021-06-22 15:40 +0200
    Re: question regarding post-installed packages Hans <hans.ullrich@loop.de> - 2021-06-22 16:00 +0200
      Re: question regarding post-installed packages Christian <abelschreck3@freenet.de> - 2021-06-22 16:20 +0200
        Re: question regarding post-installed packages Hans <hans.ullrich@loop.de> - 2021-06-22 16:40 +0200
          Re: question regarding post-installed packages Christian <abelschreck3@freenet.de> - 2021-06-22 17:10 +0200
    Re: question regarding post-installed packages Andrei POPESCU <andreimpopescu@gmail.com> - 2021-06-22 16:50 +0200
      Re: question regarding post-installed packages Greg Wooledge <greg@wooledge.org> - 2021-06-22 17:10 +0200
        Re: question regarding post-installed packages Andrei POPESCU <andreimpopescu@gmail.com> - 2021-06-23 06:00 +0200
          Re: question regarding post-installed packages David <bouncingcats@gmail.com> - 2021-06-23 09:10 +0200
            Re: question regarding post-installed packages Andrei POPESCU <andreimpopescu@gmail.com> - 2021-06-23 14:50 +0200
          Re: question regarding post-installed packages <tomas@tuxteam.de> - 2021-06-23 09:30 +0200
            Re: question regarding post-installed packages <tomas@tuxteam.de> - 2021-06-23 10:10 +0200
            Re: question regarding post-installed packages Andrei POPESCU <andreimpopescu@gmail.com> - 2021-06-23 14:50 +0200
            Re: question regarding post-installed packages David Wright <deblis@lionunicorn.co.uk> - 2021-06-23 17:00 +0200
      Re: question regarding post-installed packages Christian <abelschreck3@freenet.de> - 2021-06-22 17:10 +0200
        Re: question regarding post-installed packages Greg Wooledge <greg@wooledge.org> - 2021-06-22 17:40 +0200
          Re: question regarding post-installed packages Andrei POPESCU <andreimpopescu@gmail.com> - 2021-06-23 05:40 +0200

#236281 — question regarding post-installed packages

FromChristian <abelschreck3@freenet.de>
Date2021-06-22 15:40 +0200
Subjectquestion regarding post-installed packages
Message-ID<CsONc-1Lh-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi altogether,

I'm new to *Debian* and so far I like it very much.

I´ve some (basic) knowledge regarding Linux-distros but this knowledge 
is based on the fact that I´ve been using Lubuntu (ubuntu derivative) 
for some time now.

I appreciate there are some differences between Ubuntu and Debian so I 
installed *Debian10 buster* as a VM - in order to gather some experience 
with it.

Up and until now I seem to be getting along with it just fine and I like 
the fact that it´s really lightweight.

I´ve got one question though:

Using (L)Ubuntu I had a certain _command_ at hand which helped me with 
fresh/clean installs.

Before converting to a new version I entered the following command (on 
the old OS) in the terminal:

/comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc 
/var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/

This gave me list of all packages which were post-installed after the 
initial setup.
All I had to do was putting the results of the command in a text file, 
say "*result.txt*".

The beauty of this command is that it produces the packages (programmes 
that I installed with apt) *without* any dependencies.

After installing the new system I used the command

/xargs -a /path-to-result.txt sudo apt-get install/

and my new system was on the same level as my old one before.

Trying out that very command in Debian however didn´t work as desired:

/comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc 
/var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)//
//gzip: /var/log/installer/initial-status.gz: No such file or directory//
//adduser//
//anydesk//
//apt//
//...//
//zlib1g/

So there was some output but not the one I was looking for.

The file "*initial-status.gz*" indeed doesn´t exist in /var/log/installer.

Here are the contents of /var/log/installer in Debian:

/rosika2@debian ~> ll /var/log/installer///
//insgesamt 1,4M//
//drwxr-xr-x 2 root root 4,0K Jun 16 16:59 cdebconf///
//-rw-r--r-- 1 root root  20K Jun 16 16:59 hardware-summary//
//-rw-r--r-- 1 root root  160 Jun 16 16:59 lsb-release//
//-rw------- 1 root root 107K Jun 16 16:59 partman//
//-rw-r--r-- 1 root root  72K Jun 16 16:59 status//
//-rw------- 1 root root 1,2M Jun 16 16:59 syslog//
//-rw------- 1 root root  41K Jun 16 16:59 Xorg.0.log/

So my question is: Does this file exist at all (possibly using another 
path)?
Or is there another preferred way of getting info concerning all 
post-installed packages (without their dependencies)?

Thanks a lot for your help in advance.

Many greetings.
Rosika

[toc] | [next] | [standalone]


#236285

FromHans <hans.ullrich@loop.de>
Date2021-06-22 16:00 +0200
Message-ID<CsP6x-1RP-1@gated-at.bofh.it>
In reply to#236281

[Multipart message — attachments visible in raw view] — view raw

Am Dienstag, 22. Juni 2021, 15:30:35 CEST schrieb Christian:
Hi, 

maybe this is the command you need? From an older doku:
-------------

3.3.10 Record/copy system configuration

To make a local copy of the package selection states:

$ dpkg --get-selections "*" > myselections

 # or use \*

“*” makes myselections include package entries for “purge” too.

You can transfer this file to another computer, and install it there with:

dselect update
dpkg --set-selections <myselections
apt-get -u dselect-upgrade
or dselect install
----------------------

Hope this helps.

Best

Hans


> Hi altogether,
> 
> I'm new to *Debian* and so far I like it very much.
> 
> I´ve some (basic) knowledge regarding Linux-distros but this knowledge
> is based on the fact that I´ve been using Lubuntu (ubuntu derivative)
> for some time now.
> 
> I appreciate there are some differences between Ubuntu and Debian so I
> installed *Debian10 buster* as a VM - in order to gather some experience
> with it.
> 
> Up and until now I seem to be getting along with it just fine and I like
> the fact that it´s really lightweight.
> 
> I´ve got one question though:
> 
> Using (L)Ubuntu I had a certain _command_ at hand which helped me with
> fresh/clean installs.
> 
> Before converting to a new version I entered the following command (on
> the old OS) in the terminal:
> 
> /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/
> 
> This gave me list of all packages which were post-installed after the
> initial setup.
> All I had to do was putting the results of the command in a text file,
> say "*result.txt*".
> 
> The beauty of this command is that it produces the packages (programmes
> that I installed with apt) *without* any dependencies.
> 
> After installing the new system I used the command
> 
> /xargs -a /path-to-result.txt sudo apt-get install/
> 
> and my new system was on the same level as my old one before.
> 
> Trying out that very command in Debian however didn´t work as desired:
> 
> /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)//
> //gzip: /var/log/installer/initial-status.gz: No such file or directory//
> //adduser//
> //anydesk//
> //apt//
> //...//
> //zlib1g/
> 
> So there was some output but not the one I was looking for.
> 
> The file "*initial-status.gz*" indeed doesn´t exist in /var/log/installer.
> 
> Here are the contents of /var/log/installer in Debian:
> 
> /rosika2@debian ~> ll /var/log/installer///
> //insgesamt 1,4M//
> //drwxr-xr-x 2 root root 4,0K Jun 16 16:59 cdebconf///
> //-rw-r--r-- 1 root root  20K Jun 16 16:59 hardware-summary//
> //-rw-r--r-- 1 root root  160 Jun 16 16:59 lsb-release//
> //-rw------- 1 root root 107K Jun 16 16:59 partman//
> //-rw-r--r-- 1 root root  72K Jun 16 16:59 status//
> //-rw------- 1 root root 1,2M Jun 16 16:59 syslog//
> //-rw------- 1 root root  41K Jun 16 16:59 Xorg.0.log/
> 
> So my question is: Does this file exist at all (possibly using another
> path)?
> Or is there another preferred way of getting info concerning all
> post-installed packages (without their dependencies)?
> 
> Thanks a lot for your help in advance.
> 
> Many greetings.
> Rosika

[toc] | [prev] | [next] | [standalone]


#236288

FromChristian <abelschreck3@freenet.de>
Date2021-06-22 16:20 +0200
Message-ID<CsPpU-2dy-5@gated-at.bofh.it>
In reply to#236285

[Multipart message — attachments visible in raw view] — view raw

Hello Hans,


thanks so much for your very quick reply.

I just tried out the command you provided and it seems to produce quite 
an extensive list beginning with "acl" and ending with "zlib1g:amd64".
So it´s basically a list with all the packages which are installed by  
default plus the packages I installed afterwards.

I was hoping for a list that provides just my post-installed packages.
But I assume that in view of the fact that the /i*nitial-status.gz 
*/doesn´t seem to exist on Debian there´s no way of achieving this goal.

Never mind. Your command will certainly be of great assistance when 
setting up a new system.

Thank you very much for that, Hans.

Many greetings and keep safe.

Rosika


Am 22.06.21 um 15:52 schrieb Hans:
> Am Dienstag, 22. Juni 2021, 15:30:35 CEST schrieb Christian:
> Hi,
>
> maybe this is the command you need? From an older doku:
> -------------
>
> 3.3.10 Record/copy system configuration
>
> To make a local copy of the package selection states:
>
> $ dpkg --get-selections "*" > myselections
>
>   # or use \*
>
> “*” makes myselections include package entries for “purge” too.
>
> You can transfer this file to another computer, and install it there with:
>
> dselect update
> dpkg --set-selections <myselections
> apt-get -u dselect-upgrade
> or dselect install
> ----------------------
>
> Hope this helps.
>
> Best
>
> Hans
>

[toc] | [prev] | [next] | [standalone]


#236292

FromHans <hans.ullrich@loop.de>
Date2021-06-22 16:40 +0200
Message-ID<CsPJf-2k2-1@gated-at.bofh.it>
In reply to#236288
Am Dienstag, 22. Juni 2021, 16:17:15 CEST schrieb Christian:
Hi Christian,

I looked not further into te result file. However, if you can see in this 
file, which packages are postinstalled or dependent, you can just filter this 
file with tools like cat, grep or even sort.

On the other hand, you can make two result files. One at the first 
installation, the second one after you installed your packages. After that, 
you will see the difference of both.

In fact, my personal suggestion is, just install a minimal system, one as 
small as possible. When this is up, install all the tools and packages you 
really need. So you will always install only the stuff, you REALLY need, 
verything else ist just crap (and may be misused). 

Hope this helps either.

Best regards

Hans


> Hello Hans,
> 
> 
> thanks so much for your very quick reply.
> 
> I just tried out the command you provided and it seems to produce quite
> an extensive list beginning with "acl" and ending with "zlib1g:amd64".
> So it´s basically a list with all the packages which are installed by 
> default plus the packages I installed afterwards.
> 
> I was hoping for a list that provides just my post-installed packages.
> But I assume that in view of the fact that the /i*nitial-status.gz
> */doesn´t seem to exist on Debian there´s no way of achieving this goal.
> 
> Never mind. Your command will certainly be of great assistance when
> setting up a new system.
> 
> Thank you very much for that, Hans.
> 
> Many greetings and keep safe.
> 
> Rosika
> 
> Am 22.06.21 um 15:52 schrieb Hans:
> > Am Dienstag, 22. Juni 2021, 15:30:35 CEST schrieb Christian:
> > Hi,
> > 
> > maybe this is the command you need? From an older doku:
> > -------------
> > 
> > 3.3.10 Record/copy system configuration
> > 
> > To make a local copy of the package selection states:
> > 
> > $ dpkg --get-selections "*" > myselections
> > 
> >   # or use \*
> > 
> > “*” makes myselections include package entries for “purge” too.
> > 
> > You can transfer this file to another computer, and install it there with:
> > 
> > dselect update
> > dpkg --set-selections <myselections
> > apt-get -u dselect-upgrade
> > or dselect install
> > ----------------------
> > 
> > Hope this helps.
> > 
> > Best
> > 
> > Hans

[toc] | [prev] | [next] | [standalone]


#236298

FromChristian <abelschreck3@freenet.de>
Date2021-06-22 17:10 +0200
Message-ID<CsQ2B-2qk-1@gated-at.bofh.it>
In reply to#236292

[Multipart message — attachments visible in raw view] — view raw

Dear Hans, 😁


thanks again for your help.

 > if you can see in this file, which packages are postinstalled or 
dependent [...]

Alas that doesn´t seem to be the case.

As an example I post-installed the fish-shell and the respective entry 
simply is:

/fish                                            install/

, so basically like all the other entries as well.

But your suggestion of making two files - one after the initial OS setup 
and then another one after having done my post-installs - and then
comparing these two files really makes sense. Thanks for pointing that out.

Thanks also for your personal suggestion referring to a minimal install 
which is very good indeed and seems to be best suited for my purposes.

Your help is highly appreciated; thanks so much again.  😁

Many greetings
Rosika


Am 22.06.21 um 16:31 schrieb Hans:
> Am Dienstag, 22. Juni 2021, 16:17:15 CEST schrieb Christian:
> Hi Christian,
>
> I looked not further into te result file. However, if you can see in this
> file, which packages are postinstalled or dependent, you can just filter this
> file with tools like cat, grep or even sort.
>
> On the other hand, you can make two result files. One at the first
> installation, the second one after you installed your packages. After that,
> you will see the difference of both.
>
> In fact, my personal suggestion is, just install a minimal system, one as
> small as possible. When this is up, install all the tools and packages you
> really need. So you will always install only the stuff, you REALLY need,
> verything else ist just crap (and may be misused).
>
> Hope this helps either.
>
> Best regards
>
> Hans
>

[toc] | [prev] | [next] | [standalone]


#236297

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2021-06-22 16:50 +0200
Message-ID<CsPSW-2nj-3@gated-at.bofh.it>
In reply to#236281

[Multipart message — attachments visible in raw view] — view raw

On Ma, 22 iun 21, 15:30:35, Christian wrote:
> 
> /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/

It's unclear what exactly '/comm -23' is supposed to be and it seems 
your mail program messed with line breaks.

Also, guessing from the command, this is supposed to be run under fish 
(the shell). The default shell in Debian is bash, which needs slightly 
different syntax for what you want to do.

In any case, 'apt-mark showmanual' definitely exists and works in Debian 
and is one way to achieve what you need (aptitude is another).

The file /var/log/installer/initial-status.gz doesn't exist on a fairly 
recent install of Debian bullseye (soon to be Debian 11). I'm guessing 
it is created by the Ubuntu installer.

If you show us an example (attaching it might work, if it's not too big) 
we might come up with methods to recreate the information on a fresh 
Debian install.

Hope this helps,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#236299

FromGreg Wooledge <greg@wooledge.org>
Date2021-06-22 17:10 +0200
Message-ID<CsQci-2J5-3@gated-at.bofh.it>
In reply to#236297
On Tue, Jun 22, 2021 at 05:44:50PM +0300, Andrei POPESCU wrote:
> On Ma, 22 iun 21, 15:30:35, Christian wrote:
> > 
> > /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> > /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/
> 
> It's unclear what exactly '/comm -23' is supposed to be and it seems 
> your mail program messed with line breaks.
> 
> Also, guessing from the command, this is supposed to be run under fish 
> (the shell). The default shell in Debian is bash, which needs slightly 
> different syntax for what you want to do.

It looks like a bash command, if you make the following changes:

1) Join the two lines into one.
2) Remove leading / and trailing / characters.

Also, I don't have a /var/log/installer/initial-status.gz file, but I
do have a /var/log/installer/status file, which looks like it contains
what the command is expecting (minus the compression).  So, one might
need to adjust the second process substitution.

[toc] | [prev] | [next] | [standalone]


#236330

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2021-06-23 06:00 +0200
Message-ID<Ct2dr-1lK-3@gated-at.bofh.it>
In reply to#236299

[Multipart message — attachments visible in raw view] — view raw

On Ma, 22 iun 21, 10:57:39, Greg Wooledge wrote:
> On Tue, Jun 22, 2021 at 05:44:50PM +0300, Andrei POPESCU wrote:
> > On Ma, 22 iun 21, 15:30:35, Christian wrote:
> > > 
> > > /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> > > /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/
> > 
> > It's unclear what exactly '/comm -23' is supposed to be and it seems 
> > your mail program messed with line breaks.

Mistery solved by looking at the html part (the '/' are meant to denote 
italic), the correct command is:

	comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)


> > Also, guessing from the command, this is supposed to be run under 
> > fish (the shell). The default shell in Debian is bash, which needs 
> > slightly different syntax for what you want to do.
> 
> It looks like a bash command, if you make the following changes:
> 
> 1) Join the two lines into one.
> 2) Remove leading / and trailing / characters.

Command substitution without '$'? I must be missing something and would 
appreciate a pointer.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#236334

FromDavid <bouncingcats@gmail.com>
Date2021-06-23 09:10 +0200
Message-ID<Ct5bj-3pk-3@gated-at.bofh.it>
In reply to#236330
On Wed, 23 Jun 2021 at 13:52, Andrei POPESCU <andreimpopescu@gmail.com> wrote:
> On Ma, 22 iun 21, 10:57:39, Greg Wooledge wrote:

> Mistery solved by looking at the html part (the '/' are meant to denote
> italic), the correct command is:
>  comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

> > It looks like a bash command, if you make the following changes:
> > 1) Join the two lines into one.
> > 2) Remove leading / and trailing / characters.

> Command substitution without '$'? I must be missing something and would
> appreciate a pointer.

http://mywiki.wooledge.org/BashGuide/InputAndOutput#Process_Substitution

[toc] | [prev] | [next] | [standalone]


#236358

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2021-06-23 14:50 +0200
Message-ID<Ctaul-6qF-5@gated-at.bofh.it>
In reply to#236334

[Multipart message — attachments visible in raw view] — view raw

On Mi, 23 iun 21, 16:49:28, David wrote:
> On Wed, 23 Jun 2021 at 13:52, Andrei POPESCU <andreimpopescu@gmail.com> wrote:
> > On Ma, 22 iun 21, 10:57:39, Greg Wooledge wrote:
> 
> > Mistery solved by looking at the html part (the '/' are meant to denote
> > italic), the correct command is:
> >  comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
> 
> > > It looks like a bash command, if you make the following changes:
> > > 1) Join the two lines into one.
> > > 2) Remove leading / and trailing / characters.
> 
> > Command substitution without '$'? I must be missing something and would
> > appreciate a pointer.
> 
> http://mywiki.wooledge.org/BashGuide/InputAndOutput#Process_Substitution
 
Thank you, I searched for 'substitution' in the bash manpage and stopped 
at 'Command Substitution'. </embarrassed>

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#236335

From<tomas@tuxteam.de>
Date2021-06-23 09:30 +0200
Message-ID<Ct5uF-3vL-3@gated-at.bofh.it>
In reply to#236330

[Multipart message — attachments visible in raw view] — view raw

On Wed, Jun 23, 2021 at 06:51:39AM +0300, Andrei POPESCU wrote:

[...]

> 	comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

> Command substitution without '$'? I must be missing something and would 
> appreciate a pointer.

As David pointed out (as a pointer), the <(...) is a bashism for "pretend this is
a file name whose content is provided by the enclosed command's output".

Perhaps more readable in the symmetrical variant

  diff -u <(ls dir1) <(ls dir2)

Very handy.

Cheers
 - t

[toc] | [prev] | [next] | [standalone]


#236338

From<tomas@tuxteam.de>
Date2021-06-23 10:10 +0200
Message-ID<Ct67n-3ZP-7@gated-at.bofh.it>
In reply to#236335

[Multipart message — attachments visible in raw view] — view raw

On Wed, Jun 23, 2021 at 08:49:42AM +0100, mick crane wrote:
> On 2021-06-23 08:22, tomas@tuxteam.de wrote:

[...]

> >Perhaps more readable in the symmetrical variant
> >
> >  diff -u <(ls dir1) <(ls dir2)
> >
> >Very handy.
> >
> does not the excellent guide also say not to try to do anything with
> the output of "ls" ?

It was just intended as a minimal example. I wouldn't bury the
above deep in a script working quietly in some machine room,
definitely not.

But then, I'd consider it twice to use a bashism down there; in
the quick command line, where you can deal with the fallout should
things move, it seems OK.

So I'd say "it depends" :)

Cheers
 - t

[toc] | [prev] | [next] | [standalone]


#236357

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2021-06-23 14:50 +0200
Message-ID<Ctaul-6qF-3@gated-at.bofh.it>
In reply to#236335

[Multipart message — attachments visible in raw view] — view raw

On Mi, 23 iun 21, 09:22:24, tomas@tuxteam.de wrote:
> On Wed, Jun 23, 2021 at 06:51:39AM +0300, Andrei POPESCU wrote:
> 
> [...]
> 
> > 	comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
> 
> > Command substitution without '$'? I must be missing something and would 
> > appreciate a pointer.
> 
> As David pointed out (as a pointer), the <(...) is a bashism for "pretend this is
> a file name whose content is provided by the enclosed command's output".
> 
> Perhaps more readable in the symmetrical variant
> 
>   diff -u <(ls dir1) <(ls dir2)
> 
> Very handy.

It certainly appears to be very handy, though I generally try to steer 
away from bashims in scripts, and for interactive use my primary shell 
is now fish.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#236375

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2021-06-23 17:00 +0200
Message-ID<Ctcw9-7Al-3@gated-at.bofh.it>
In reply to#236335
On Wed 23 Jun 2021 at 08:49:42 (+0100), mick crane wrote:
> On 2021-06-23 08:22, tomas@tuxteam.de wrote:
> > On Wed, Jun 23, 2021 at 06:51:39AM +0300, Andrei POPESCU wrote:
> > 
> > [...]
> > 
> > > 	comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> > > /var/log/installer/initial-status.gz | sed -n 's/^Package:
> > > //p' | sort -u)
> > 
> > > Command substitution without '$'? I must be missing something
> > > and would
> > > appreciate a pointer.
> > 
> > As David pointed out (as a pointer), the <(...) is a bashism for
> > "pretend this is
> > a file name whose content is provided by the enclosed command's
> > output".
> > 
> > Perhaps more readable in the symmetrical variant
> > 
> >   diff -u <(ls dir1) <(ls dir2)
> > 
> > Very handy.
> > 
> does not the excellent guide also say not to try to do anything with
> the output of "ls" ?

That would make ls effectively useless. No, the output from ls is for
parsing by eyeball, not by scripts. That's what's important.
In the example, diff doesn't parse the output, it just presents the
differences between two slabs of text for your eyeball to parse.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#236300

FromChristian <abelschreck3@freenet.de>
Date2021-06-22 17:10 +0200
Message-ID<CsQci-2J5-7@gated-at.bofh.it>
In reply to#236297

[Multipart message — attachments visible in raw view] — view raw

Hi Andrei,

thanks a lot for your reply. 😁

 > It's unclear what exactly '/comm -23' is supposed to be

Well, from the man pages (man comm) :

/comm [OPTION]... FILE1 FILE2//
//
//DESCRIPTION//
//       Compare sorted files FILE1 and FILE2 line by line.

       -1     suppress column 1 (lines unique to FILE1)

        -2     suppress column 2 (lines unique to FILE2)
/
So I think the comm-command should be for comparison of files.

I´ve always used *bash* for executing the command, so this shouldn´t be 
the problem.

 > [initial-status.gz-file] I'm guessing it is created by the Ubuntu 
installer.

Yes, I think so as well. Thanks for confirming that.

 > If you show us an example [...]

Sorry, Andrei, I´m not quite sure what you mean by that.

Thanks anyway for your kind help.

All the best.
Rosika


Am 22.06.21 um 16:44 schrieb Andrei POPESCU:
> On Ma, 22 iun 21, 15:30:35, Christian wrote:
>> /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
>> /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/
> It's unclear what exactly '/comm -23' is supposed to be and it seems
> your mail program messed with line breaks.
>
> Also, guessing from the command, this is supposed to be run under fish
> (the shell). The default shell in Debian is bash, which needs slightly
> different syntax for what you want to do.
>
> In any case, 'apt-mark showmanual' definitely exists and works in Debian
> and is one way to achieve what you need (aptitude is another).
>
> The file /var/log/installer/initial-status.gz doesn't exist on a fairly
> recent install of Debian bullseye (soon to be Debian 11). I'm guessing
> it is created by the Ubuntu installer.
>
> If you show us an example (attaching it might work, if it's not too big)
> we might come up with methods to recreate the information on a fresh
> Debian install.
>
> Hope this helps,
> Andrei

[toc] | [prev] | [next] | [standalone]


#236302

FromGreg Wooledge <greg@wooledge.org>
Date2021-06-22 17:40 +0200
Message-ID<CsQFk-2Sg-7@gated-at.bofh.it>
In reply to#236300
On Tue, Jun 22, 2021 at 05:08:35PM +0200, Christian wrote:
> Hi Andrei,
> 
> thanks a lot for your reply. 😁
> 
> > It's unclear what exactly '/comm -23' is supposed to be
> 
> Well, from the man pages (man comm) :
> 
> /comm [OPTION]... FILE1 FILE2//

Your mail user agent (or your editor) appears to be adding forward slash
characters to lines, perhaps to represent "this is terminal input/output",
or "use a fixed-width font", or something similar.

These slash characters are causing some confusion.

> //
> //DESCRIPTION//
> //       Compare sorted files FILE1 and FILE2 line by line.

They're a bit messy.  It takes some guesswork to extract the valid shell
command from inside the slashed-up text, especially when the number of
slashes added per line is variable.

[toc] | [prev] | [next] | [standalone]


#236329

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2021-06-23 05:40 +0200
Message-ID<Ct1U5-1fi-1@gated-at.bofh.it>
In reply to#236302

[Multipart message — attachments visible in raw view] — view raw

On Ma, 22 iun 21, 11:25:00, Greg Wooledge wrote:
> On Tue, Jun 22, 2021 at 05:08:35PM +0200, Christian wrote:
> > Hi Andrei,
> > 
> > thanks a lot for your reply. 😁
> > 
> > > It's unclear what exactly '/comm -23' is supposed to be
> > 
> > Well, from the man pages (man comm) :
> > 
> > /comm [OPTION]... FILE1 FILE2//
> 
> Your mail user agent (or your editor) appears to be adding forward slash
> characters to lines, perhaps to represent "this is terminal input/output",
> or "use a fixed-width font", or something similar.
> 
> These slash characters are causing some confusion.
> 
> > //
> > //DESCRIPTION//
> > //       Compare sorted files FILE1 and FILE2 line by line.
> 
> They're a bit messy.  It takes some guesswork to extract the valid shell
> command from inside the slashed-up text, especially when the number of
> slashes added per line is variable.
 
It seems to be due to this particular mail client's attempt to generate 
a plain text version of a message originally composed as html.

Christian, please post only in plain text to debian-user, especially 
when copy-pasting shell commands (or output).

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web