1.

Solve : .profile Script Issue - command not found?

Answer»

In my .profile script on my Sun Solaris machines I use the FOLLOWING command to retrieve the host name into an environment variable:

HOST=`uname -n`

This WORKS fine on Sun, but on my Linux machines I get the following message when the .profile runs and the variable is EMPTY:

ksh: ./.profile[10]: uname: not found

What syntax changes do I need to make to get the same funcationality to work on Linux that works on Sun?

Linux Version:  2.4.21-47.ELsmp
Sun version: SunOS 5.8

Thanks!Try specifying the full path to uname (usually /bin/uname).  Or you can use /bin/hostname in place of "uname -n".Fantastic, that worked.  Thank you.  It's always the little things.  I guess I was attempting to CALL those commands before the path had been established.
No problem.



Discussion

No Comment Found