> I can do this: > wiz# ls -d /var/db/pkg/nginx* > /var/db/pkg/nginx-1.26.3 > > and this as well: > wiz# pkg_check /var/db/pkg/nginx-1.26.3 > > but I can't do this: > wiz# ls -d /var/db/pkg/nginx* | pkg_check
pkg_check(8) will check consistency of ALL installed packages when executed without package name as an argument. However I don't understand what problem you are trying to solve I think you want to execute pkg_check(8) with the output of ls(1) as argument. This is exactly what xargs(1) does. From its manpage "...construct argument list(s) and execute utility". So your command would be: $ ls -d /var/db/pkg/nginx* | xargs pkg_check