simple question on conditional expression

Helmut Jarausch <[email protected]> Mon, 06 Oct 2025 12:24:19 +0200
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>
Hi,

When I try

ANS='ABC'
if ( echo $ANS | grep B ); then echo OK;fi

it echoes $ANS.
How can I disable this?

Many thanks for a hint,
Helmt