On Monday 23 July 2007 14:39:37 Stepan Kasal wrote [edited]:

Hello Stepan,

> But I think it is more natural to use awk for such a task, instead of
> several processes.  For example, the above example can be implemented with
> GNU awk this way:
>
> $ apt-cache search view |
>   gawk 'BEGIN{IGNORECASE=1};
>         (/image/ || /picture/) && !(/gtk/ || /gnome/)'

The submitted script was more of a demonstration of the idea of a shortcut 
utility, rather than something meant for immediate inclusion. (The idea is 
that using the script is easier than typing a pipeline of greps or an awk 
script everytime.) I understand that there's no interest for such a utility, 
but thanks for pointing out a more efficient way for implementing it!

Thanks,
Serafeim


Reply via email to