* On 2002.03.27, in <[EMAIL PROTECTED]>, * "Rocco Rutte" <[EMAIL PROTECTED]> wrote: > > something like 'hostname | cut ...' to get the short name. If I - on > Solaris - run 'hostname -s' it tells me: 'uname: not super user'. So I > use a switch in my .profile to find wether this is Solaris or not.
It says "uname: not super user" because uname(2) is the syscall that sets the hostname. Just use uname -n on all operating systems, and don't trouble yourself with the switch. "uname -n" returns the nodename. The nodename is the "real" hostname, and has nothing to do with the DNS or /etc/hosts name that your IP address resolves to, and should not contain any dots. (If it does, your system setup needs adjustment.) -- -D. [EMAIL PROTECTED] NSIT University of Chicago