Found the solution by myself :)
./telnet.sh | telnet > /tmp/top.txt
./telnet.sh | telnet > /tmp/top.txt In this way I redirect the command to an output file. However, I have to run the same script many times and I don't want overwrite the same file, but I would create and incremental file (good idea would be renamed with DATE command). Any suggestion?
to use a date option
./telnet.sh | telnet > /tmp/top-$(date +%Y%m%d-%T).txt