printing over tcp/ip via telnet session

I am new to unix. Currently using solaris 6.8 (i think).

I need to telnet into a remote server, and print out a report to a printer near me, that DOES NOT have a printcap set-up for the printer on the remote server. I was hoping to do this via tcp/ip since the printer does have a static ip address.

i need help with a command line to print, for instance, a report of the free disk-space on aparticular server
#df -k | lp -d

Please Help!!

The way I would do it 'quick and dirty' would be to telnet, run the command and email the results back to the host you can print from. For example (assuming you use elm, please use your favorite command line mailer... mail, sendmail, pine, elm, etc.):

If you need to do this a lot, then you would use the cron and crontab to make it happen automatically.

Then if you need to automatically print it, you would write a simple mail filter to take the mail and sent it to the printer. You could also format with the script, if you want to reformat.