Version 1 of ambiguous result with "info hostname "

Updated 2010-04-08 09:26:15 by MaheshD

The issue is as below :

My machine : pc-vj.sj.com

Bash command : "hostname" returns - pc-vj.sj.com and ip-address is 10.0.0.225

But

Tclsh8.4 command : "info hostname" returns - localhost.localdomain and ip-address is 127.0.0.1

Expected is the same behavior as the bash euqivalent "hostname".

Why is this ambiguity ? Is it not reliable to use "info hostname" ? If yes (not reliable), what is the equivalent command (other than hostname) ?