Pesquisa usando âncoras ( ^...
)
Você pode procurar por entradas que começam com a string "git" assim.
Exemplo
$ apt-cache search ^git | head -10
git - fast, scalable, distributed revision control system
git-core - fast, scalable, distributed revision control system (obsolete)
git-doc - fast, scalable, distributed revision control system (documentation)
git-man - fast, scalable, distributed revision control system (manual pages)
gitk - fast, scalable, distributed revision control system (revision tree visualizer)
easygit - git for mere mortals
gforge-plugin-scmgit - Git plugin for FusionForge (transitional package)
git-all - fast, scalable, distributed revision control system (all subpackages)
git-annex - manage files with git, without checking their contents into git
git-arch - fast, scalable, distributed revision control system (arch interoperability)
Esta é uma diferença sutil de apenas procurar pela string "git", mas a diferença é que esta busca irá encontrar substrings que começam com a string "git", enquanto uma busca bareword por "git" retornará entradas como "digital" ".
Você também pode restringir a saída de apt-cache search ^git
canalizando a saída para um grep
adicional como este:
Filtrar usando grep
$ apt-cache search ^git | grep "^git" | head -10
git - fast, scalable, distributed revision control system
git-core - fast, scalable, distributed revision control system (obsolete)
git-doc - fast, scalable, distributed revision control system (documentation)
git-man - fast, scalable, distributed revision control system (manual pages)
gitk - fast, scalable, distributed revision control system (revision tree visualizer)
git-all - fast, scalable, distributed revision control system (all subpackages)
git-annex - manage files with git, without checking their contents into git
git-arch - fast, scalable, distributed revision control system (arch interoperability)
git-buildpackage - Suite to help with Debian packages in Git repositories
git-cola - highly caffeinated git GUI
Que mostrará apenas os pacotes cujos nomes começam com a string "git".
Use a opção --names-only
Isso só irá procurar os nomes dos pacotes para as partidas que começam com a string "git".
$ apt-cache search --names-only ^git | head -10
git - fast, scalable, distributed revision control system
git-core - fast, scalable, distributed revision control system (obsolete)
git-doc - fast, scalable, distributed revision control system (documentation)
git-man - fast, scalable, distributed revision control system (manual pages)
gitk - fast, scalable, distributed revision control system (revision tree visualizer)
git-all - fast, scalable, distributed revision control system (all subpackages)
git-annex - manage files with git, without checking their contents into git
git-arch - fast, scalable, distributed revision control system (arch interoperability)
git-buildpackage - Suite to help with Debian packages in Git repositories
git-cola - highly caffeinated git GUI