Fantastic! I received several very helpful responses to my question about getting the client IP address from the shell during a telnet or ssh session. The list of respondents is long so to keep things short I'll just say thanks to everyone who replied.
The simplest solution that I received from several people was to use the who -m command and pipe it through awk and sed.
#!/bin/sh
client_addr=`who -m | awk '{ printf $NF }' | sed 's/[()]//g'`
Thanks again!
Mike Hutcheson (Mike_Hutcheson_at_baylor.edu)
Systems Manager (254) 710-4110
Baylor University - Information Technology Services
Received on Fri Jan 31 2003 - 19:51:16 NZDT