假设我想在luasocket中搜索包OpenSUSE,但是我不知道它是lua-socket、lua_socket、liblua-socket、lua5.1-socket、socket-lua还是谁知道是什么。
因此,我搜索:
zypper se lua socket问题在于它同时显示了包含lua关键字的包和包含socket关键字的包,从而使我的屏幕上充满了我不想要的结果。
zypper search --help告诉如下内容:
Command options:
--match-all Search for a match with all search strings (default).
--match-any Search for a match with any of the search strings.但是--match-all似乎不像我所期望的那样工作。我和术语如何在OpenSUSE中搜索数据包?
注:如有可能,应以比以下更清洁的方式:
zypper se lua | grep socket发布于 2014-06-13 18:50:05
我认为这将是你最清洁的选择(如在容易打字)。
您可以在zypper中执行正则表达式:
在帮助屏幕上:
* and ? wildcards can also be used within search strings.
If a search string is enclosed in '/', it's interpreted as a regular expression.发布于 2014-06-13 18:59:34
你可以试试:
zypper se 'lua*socket'发布于 2021-01-14 09:41:22
尝试使用regex和/或更多的模式搜索,如下所示:
sudo zypper search /lib.*Qt.*Chart/ /lib.*Qt.*Web/如手册页所述
search (se) [options] [querystring|capability]...
Search for packages matching any of the given search strings. * and ? wildcard characters can be used within search strings. If the search string is enclosed in / (e.g. /^k.*e$/) it’s interpreted as a regular expression. See the install command for details about how to specify a capability.https://unix.stackexchange.com/questions/84718
复制相似问题