Environment vars calling programs

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: J.L.Francoisfrenchie@magusnet.gilbert.az.us
Date:  
Subject: Environment vars calling programs
Orig Msg> Ok, here's the first HP-UX question. I want to setup the HOSTNAME var to
Orig Msg> function like it does under Linux. If I set HOSTNAME='/bin/hostname' and
Orig Msg> echo $HOSTNAME I get '/bin/hostname' printed back, not the hostname of the
Orig Msg> machine.. Any ideas?
Orig Msg>
Orig Msg> Don
Orig Msg>
Orig Msg>

Your ticks are backward.
assuming a bash like shell try:
HOSTNAME=`/bin/hostname`
export HOSTNAME
echo $HOSTNAME

Jean Francois - JLF Sends...
President & CEO - MagusNet, Inc., MagusNet.com, MagusNet.Gilbert.AZ.US
Director Of Managed Services - OpNIX,Inc., www.opnix.com
OpNIX - Simply Better Bandwidth
602-770-JLF1 - Cellular, ICQ: 8137851
My Certifications:
http://www.brainbench.com/transcript.jsp?pid=1214021
Doing my part to educate the Clubie Illiterati. One LART at a time!