BASH Problem / Question regarding redirection

Hi all,

Maybe someone is able to help:

Need to redirect the output of a command in realtime to a second command. Command-A executes a remote shell to another host, and outputs its results. Command-B displays a "dialog" with the outputs of Command-A.

Command-A Output:

Updating FileA
Updating FileB
Updating FileC
etc

It takes about a minute for the whole output to finish.

I've tried:

for p in `ssh user@ip.ip.ip.ip /etc/cron.hourly/command`; do dialog --infobox "$p" 3 40;done

This actually prints out the dialog, but with all the output at once. I need something that will redirect the output in realtime. So I tried:

'ssh user@ip.ip.ip.ip /etc/cron.hourly/command' | dialog --infobox "$?" 3 40

with no luck until now.

Can anyone give me a hint how to resolve this?

It's not a problem with the shell, but with dialog. Skimming through the man page I found the progressbox, which might be what you want, eg

ssh user@ip.ip.ip.ip /etc/cron.hourly/command | dialog --progressbox 3 40

Thanks! It worked!