The following command works for encoding `stdin` using `echo`:

```
echo "abc" | openssl enc -base64

```

This command also works for substituting characters in `stdin` using `cat`:

```
cat | sed 's/a/b/g'

```

However, the following command, which should encode `stdin` using `cat` does not meet my needs, because it doesn't display the encoded value every time I hit return.

```
cat | openssl enc -base64

```

How do I encode `stdin` on-the-fly using `cat`?