Você acabou de executar
$ echo $i | grep cat
> the cat is a crazy
Grep print lines matching a pattern
Você quer usar -
-o, --only-matching
Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line.
$ i="the cat is a crazy"; word=$( echo $i | grep -o cat ); echo $word;
> cat