I have the following output on my terminal
* These packages depend on app-portage/gentoolkit-0.6.5:
* These packages depend on app-portage/getuto-1.11:
sys-apps/portage-3.0.63 (!build ? app-portage/getuto)
* These packages depend on app-portage/portage-utils-0.96.1:
app-admin/perl-cleaner-2.31 (!pkgcore ? app-portage/portage-utils)
How do I only grep lines such as gentoolkit that have no lines following it?
What I have tried : some command | xargs grep -eF ".*\n\n"
But this returns File or Directory not found.
What I am trying to achieve?
In gentoo linux, eix-installed -a | xargs equery depends gives the dependency for all packages. I want to find the ones that have no dependencies listed.
Although @oguz-ismail's answer would work with the sample output provided, it seems that actual
equeryoutput becomes garbled when it is fed into a pipe.This convoluted commandline seems to work around the problems:
scriptmakesequerybelieve it is writing to a terminalscript's stdin from/dev/nullavoids some display oddities (cf. re-enable on-screen carriage return behaviour without including them in the data stream)trstrips the carriage returns added byscriptgrepfilters some non-dependency info (per @konsolebox comment)awksplits on empty lines and filters out multi-line records