In general, I'd use
ssh (secure shell) instead of
telnet. As redirection happens in your local shell, you can do
ssh other_computer ifconfig ... > ifconfig.out
(The "..." stands for any options you want to pass to
ifconfig.)
I don't know your exact circumstances, and if you're forced to use
telnet, I don't know of such an elegant solution. You could start
script before
telnet, and when you exit from both, you'll have a transcript of the whole session in file "typescript".
Regarding your subject, I just came across
How to Ask Questions the Smart Way -- great reading!