19.01.23, 09:10 +0100, js-priv@online.de:
Hello together, listing packages in apt with ”sudo“ in the title returns different output (bash commands at the end of the email). I would fill a bug report, but I'm not sure whether to address it to grep or apt. How do you see this?
To me it seems there's neither a bug in apt nor in grep but rather in your regular expressions.
Kind regards Julian Schreck -- $ apt list sudo* vs. $ apt list | grep "^sudo[a-z-]"
The former also matches "sudo", the latter RE does not - it matches ex. "sodoa" or "sudo-".
$ apt list *sudo vs. $ apt list | grep "[a-z-]sudo/"
The former also matches "sudo", the latter RE does not - it matches ex. "bsudo" or "-sudo".
$ apt list *sudo* vs. $ apt list | grep "sudo"
This might give the same results.BTW: using unquoted wildcards in parameters to shell commands is most often a bad idea (unless they are really meant to be file name patterns).
-- Regards mks