On Wed, 24 Mar 2010 19:00:06 +0200 Gregory Edigarov wrote:

> Hello Everybody,
> 
> Just wonder how could one implement what gnu grep -o flag does using
> our toolchain? 
> 
> from ggrep(1):
> 
>  -o, --only-matching
>               Show  only the part of a matching line that matches
>               PATTERN.
> 
> 


maybe try this:
sed -n -e 's/.*\(PATTERN\).*/\1/ -e /PATTERN/p

Reply via email to