tags:

views:

123

answers:

2

How can I make such a conditional search in Bash like in Google

"python" imag

The word python must be in the search, while the word imag aims to match at least image and imaging.

I want to search a python module for images, perhaps in apt-get.

+1  A: 

A dirty method should be use spaces. When you're looking exact words, they are likely to be between spaces. eg for apt:

apt-cache search " python " imag*

EDIT

A cleaner is the following:

apt-cache search '\<python\>' imag*
Jérôme
+2  A: 

The grep option for searching a word is -w:

grep -w python | grep imag
mouviciel