vlad,
Thanks again for responding, much appreciated.
I don't have a copy of the input here in front of me, but each line has 4 text fields (10 chars or less) separated by spaces.
The weird thing is, if I run the exact same thing from the command-line, it works fine with correct output (3rd field only). I run it in the script and I get the whole line.
From the command line, I do it in 2 steps:
1) ssh <ip-addr>
2) prog1 | grep data | awk '{print $3}' > tmp3.out
Of course, with the command-line version, tmp3.out ends up on the target machine.
hg