1

If I run:

apt-get install --dry-run 2klic-embedded-gui=*-master

I get:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
2klic-embedded-gui is already the newest version.
Selected version '3.1.0-8-master' (all 2klic-updates:2klic-updates [all]) for '2klic-embedded-gui'
0 upgraded, 0 newly installed, 0 to remove and 182 not upgraded.

I'm trying:

apt-get install --dry-run 2klic-embedded-gui=*-master 2>&1 | grep gui

Which doesn't return anything. So I try stdbuf:

stdbuf -oL -eL apt-get install --dry-run 2klic-embedded-gui=*-master 2>&1 | grep gui

This returns line 4 but I'm expecting both line 4 and 5.

Why doesn't line 5 get redirected to grep?

3

When apt-get’s output isn’t a terminal, it defaults to quiet mode, which amongst other things disables outputting the “Selected version” lines. To override this, add -q=0:

apt-get install -q=0 --dry-run 2klic-embedded-gui=*-master 2>&1 | grep gui

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.