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?
PS:
- (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
CodePudding user response:
pacman -Qe | comm packagesList -
or
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.
