Hello Boaz,
Are you implying that environment variables cannot be created by a program
other than a shell? Environment variables are not shell specific.
Sure, shells usually set common variables, but in no way is the
environment shell dependent, just man 7 environ.
As for the REMOTEHOST issue, here is the appropriate code excerpt:
Taken from login.c
"/*
* Add remote hostname to the environment. I think
* (not sure) I saw it once on Irix. --marekm
*/
addenv("REMOTEHOST", hostname);"
As I said before, REMOTEHOST cannot be set by the shell, since the shell has no
way of determining its peer.
Regards, Yotam Rubin
Boaz wrote:
> I've just tried this on RH Linux and Solaris both with bash (but different bash
> version). Some logins I have on those machines are as root and some as a regular
> user. Some of the logins yielded the expected output from "echo $REMOTEHOST" but
> some didn't produce any output. Can't find the reason for that (and I dont have
> time to delve into it now...).
>
> Besides, AFAIK, enviroment variables are all shell dependant as they are created
> by the shell. Some might be completely standard, like TERM, but they are all to
> the mercy of the shell. (Ofcourse, I would love to be corrected or better
> rephrased :-) .
>
> Boaz.
> --
> /"\
> \ / ASCII Ribbon Campaign
> x Against HTML Mail
> / \
>
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]
>
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]