• Uncategorized

About linux : GNULinux-using-comm-with-a-file-and-the-output-of-a-command

Question Detail

I want to use the comm command to compare a text file and the output of a command.

My first idea was to run:

comm packagesList $(pacman -Qe)

However, that doesn’t work. I also tried using ´pacman -Qe´ just in case, but it doesn’t work either. What am I missing?


  • (packagesList is a text file with a list of my packages)
  • I’m running a fresh Arch Linux installation (straight out of the oven)

Thanks in advance

Question Answer

pacman -Qe | comm packagesList -


comm packagesList <(pacman -Qe)

Topics to research: what are standard streams and stdin/stderr/stdout, man comm -> When FILE1 or FILE2 (not both) is -, read standard input, what are command substitution and process substitution terms in shell context.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.