how to set environment variable in solaris 10

  • Follow


Hi,
I am new to Solaris and I am trying to set an environment variable
related to a software I am trying to install on Solaris 10.
I gave the command:
export AC_SERVER_HOME = /export/home/actuate
When I say echo $AC_SERVER_HOME, I only get a blank line.
Please let me know where am I going wrong.

Thanks,
Ravi

0
Reply ravykanth (3) 5/27/2007 12:37:49 AM

ravykanth@gmail.com wrote:
> Hi,
> I am new to Solaris and I am trying to set an environment variable
> related to a software I am trying to install on Solaris 10.
> I gave the command:
> export AC_SERVER_HOME = /export/home/actuate
> When I say echo $AC_SERVER_HOME, I only get a blank line.
> Please let me know where am I going wrong.
> 
> Thanks,
> Ravi
> 


export AC_SERVER_HOME = "/export/home/actuate"

0
Reply Richard 5/27/2007 12:40:56 AM


On May 26, 8:40 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
wrote:
> ravyka...@gmail.com wrote:
> > Hi,
> > I am new to Solaris and I am trying to set an environment variable
> > related to a software I am trying to install on Solaris 10.
> > I gave the command:
> > export AC_SERVER_HOME = /export/home/actuate
> > When I say echo $AC_SERVER_HOME, I only get a blank line.
> > Please let me know where am I going wrong.
>
> > Thanks,
> > Ravi
>
> export AC_SERVER_HOME = "/export/home/actuate"


It didn't work, it says
=: is not an identifier
I tried without spaces around the = sign but it says:
AC_SERVER_HOME=/export/home/actuate: is not an identifier
I doing all this as root user, I don't know if that matters?

0
Reply ravykanth 5/27/2007 12:45:17 AM

ravykanth@gmail.com wrote:
> On May 26, 8:40 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
> wrote:
> 
>>ravyka...@gmail.com wrote:
>>
>>>Hi,
>>>I am new to Solaris and I am trying to set an environment variable
>>>related to a software I am trying to install on Solaris 10.
>>>I gave the command:
>>>export AC_SERVER_HOME = /export/home/actuate
>>>When I say echo $AC_SERVER_HOME, I only get a blank line.
>>>Please let me know where am I going wrong.
>>
>>>Thanks,
>>>Ravi
>>
>>export AC_SERVER_HOME = "/export/home/actuate"
> 
> 
> 
> It didn't work, it says
> =: is not an identifier
> I tried without spaces around the = sign but it says:
> AC_SERVER_HOME=/export/home/actuate: is not an identifier
> I doing all this as root user, I don't know if that matters?
> 

It does not appear that what you tried is what I reccommended!  There 
was no colon in what I wrote!!

Cut and paste the following line or type it in exactly as written!
export AC_SERVER_HOME = "/export/home/actuate"


0
Reply Richard 5/27/2007 12:58:21 AM

On May 26, 8:58 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
wrote:
> ravyka...@gmail.com wrote:
> > On May 26, 8:40 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
> > wrote:
>
> >>ravyka...@gmail.com wrote:
>
> >>>Hi,
> >>>I am new to Solaris and I am trying to set an environment variable
> >>>related to a software I am trying to install on Solaris 10.
> >>>I gave the command:
> >>>export AC_SERVER_HOME = /export/home/actuate
> >>>When I say echo $AC_SERVER_HOME, I only get a blank line.
> >>>Please let me know where am I going wrong.
>
> >>>Thanks,
> >>>Ravi
>
> >>export AC_SERVER_HOME = "/export/home/actuate"
>
> > It didn't work, it says
> > =: is not an identifier
> > I tried without spaces around the = sign but it says:
> > AC_SERVER_HOME=/export/home/actuate: is not an identifier
> > I doing all this as root user, I don't know if that matters?
>
> It does not appear that what you tried is what I reccommended!  There
> was no colon in what I wrote!!
>
> Cut and paste the following line or type it in exactly as written!
> export AC_SERVER_HOME = "/export/home/actuate"

I understand what you are saying, but  I tried again now and I am sure
I did not type the colon in the command
but in the error message it shows a colon sign.

0
Reply ravykanth 5/27/2007 1:03:13 AM

On Sat, 26 May 2007 18:03:13 -0700, ravykant wrote:

> On May 26, 8:58 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
> wrote:

>> Cut and paste the following line or type it in exactly as written!
>> export AC_SERVER_HOME = "/export/home/actuate"

That won't work with the proper root shell - /sbin/sh.

> I understand what you are saying, but  I tried again now and I am sure
> I did not type the colon in the command
> but in the error message it shows a colon sign.

Try this instead:

# AC_SERVER_HOME = "/export/home/actuate"; export AC_SERVER_HOME


0
Reply Dave 5/27/2007 1:09:25 AM

On May 26, 9:09 pm, Dave Uhring <daveuhr...@yahoo.com> wrote:
> On Sat, 26 May 2007 18:03:13 -0700, ravykant wrote:
> > On May 26, 8:58 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
> > wrote:
> >> Cut and paste the following line or type it in exactly as written!
> >> export AC_SERVER_HOME = "/export/home/actuate"
>
> That won't work with the proper root shell - /sbin/sh.
>
> > I understand what you are saying, but  I tried again now and I am sure
> > I did not type the colon in the command
> > but in the error message it shows a colon sign.
>
> Try this instead:
>
> # AC_SERVER_HOME = "/export/home/actuate"; export AC_SERVER_HOME


Now, I get AC_SERVER_HOME: not found

0
Reply ravykanth 5/27/2007 1:12:51 AM

On May 26, 9:12 pm, ravyka...@gmail.com wrote:
> On May 26, 9:09 pm, Dave Uhring <daveuhr...@yahoo.com> wrote:
>
> > On Sat, 26 May 2007 18:03:13 -0700, ravykant wrote:
> > > On May 26, 8:58 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
> > > wrote:
> > >> Cut and paste the following line or type it in exactly as written!
> > >> export AC_SERVER_HOME = "/export/home/actuate"
>
> > That won't work with the proper root shell - /sbin/sh.
>
> > > I understand what you are saying, but  I tried again now and I am sure
> > > I did not type the colon in the command
> > > but in the error message it shows a colon sign.
>
> > Try this instead:
>
> > # AC_SERVER_HOME = "/export/home/actuate"; export AC_SERVER_HOME
>
> Now, I get AC_SERVER_HOME: not found


Thanks a lot, it worked, I had to remove the spaces around the = sign.
This is what worked:
AC_SERVER_HOME="/export/home/actuate";export AC_SERVER_HOME

0
Reply ravykanth 5/27/2007 1:16:50 AM

ravykanth@gmail.com wrote:
> On May 26, 8:58 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
> wrote:
> 
>>ravyka...@gmail.com wrote:
>>
>>>On May 26, 8:40 pm, "Richard B. Gilbert" <rgilber...@comcast.net>
>>>wrote:
>>
>>>>ravyka...@gmail.com wrote:
>>>
>>>>>Hi,
>>>>>I am new to Solaris and I am trying to set an environment variable
>>>>>related to a software I am trying to install on Solaris 10.
>>>>>I gave the command:
>>>>>export AC_SERVER_HOME = /export/home/actuate
>>>>>When I say echo $AC_SERVER_HOME, I only get a blank line.
>>>>>Please let me know where am I going wrong.
>>>>
>>>>>Thanks,
>>>>>Ravi
>>>>
>>>>export AC_SERVER_HOME = "/export/home/actuate"
>>>
>>>It didn't work, it says
>>>=: is not an identifier
>>>I tried without spaces around the = sign but it says:
>>>AC_SERVER_HOME=/export/home/actuate: is not an identifier
>>>I doing all this as root user, I don't know if that matters?
>>
>>It does not appear that what you tried is what I reccommended!  There
>>was no colon in what I wrote!!
>>
>>Cut and paste the following line or type it in exactly as written!
>>export AC_SERVER_HOME = "/export/home/actuate"
> 
> 
> I understand what you are saying, but  I tried again now and I am sure
> I did not type the colon in the command
> but in the error message it shows a colon sign.
> 

login: rbg
Password:
Last login: Fri May 25 01:13:33 from 192.168.1.103
Sun Microsystems Inc.   SunOS 5.8       Generic Patch   October 2001
sunblok_$  AC_SERVER_HOME=/export/home/actuate
sunblok_$  export AC_SERVER_HOME
sunblok_$  echo $AC_SERVER_HOME
/export/home/actuate
sunblok_$

or
SunOS 5.8

login: rbg
Password:
Last login: Sat May 26 21:32:24 from 192.168.1.103
Sun Microsystems Inc.   SunOS 5.8       Generic Patch   October 2001
sunblok_$  export AC_SERVER_HOME=/export/home/actuate
sunblok_$  echo $AC_SERVER_HOME
/export/home/actuate
sunblok_$

0
Reply Richard 5/27/2007 1:40:24 AM

On Sat, 26 May 2007 17:37:49 -0700, ravykant wrote:

> Hi,
> I am new to Solaris and I am trying to set an environment variable related
> to a software I am trying to install on Solaris 10. I gave the command:
> export AC_SERVER_HOME = /export/home/actuate When I say echo

No space between variable and = and setting
eg:

export AC_SERVER_HOME=/export/home/actuate

> $AC_SERVER_HOME, I only get a blank line. Please let me know where am I
> going wrong.
> 
> Thanks,
> Ravi

-- 
	Bruce

"The internet is a huge and diverse community and   
not every one is friendly" 		           
        http://www.ytc1.co.uk                     

0
Reply Bruce 5/27/2007 10:31:45 AM

quoting Richard B. Gilbert (Sat, 26 May 2007 21:40:24 -0400):
> sunblok_$  AC_SERVER_HOME=/export/home/actuate
> sunblok_$  export AC_SERVER_HOME
> sunblok_$  echo $AC_SERVER_HOME
> /export/home/actuate

> sunblok_$  export AC_SERVER_HOME=/export/home/actuate
> sunblok_$  echo $AC_SERVER_HOME
> /export/home/actuate

With /bin/sh (or /sbin/sh) you cannot do an export oneliner like
export VAR="text". You HAVE to define it first and then export it.
With other shells like zsh or bash it does work in an oneliner.

-- 
Dick Hoogendijk -- PGP/GnuPG key: F86289CE
++ http://nagual.nl/ | Solaris 10 11/06 ++
0
Reply Dick 5/27/2007 12:38:08 PM

ravykanth@gmail.com wrote:
> This is what worked:
> AC_SERVER_HOME="/export/home/actuate";export AC_SERVER_HOME

You can save a couple keystrokes:

AC_SERVER_HOME=/export/home/actuate export AC_SERVER_HOME

Note there's no semicolon so it is a single shell command
(homework: *why* does it work without the semicolon?)

You don't need quotes unless there are spaces in the value.
0
Reply Oscar 5/27/2007 2:37:26 PM

This entries where working on my machine

bash# AC_SERVER_HOME=/export/home/actuate
bash# export AC_SERVER_HOME
bash# env|grep AC_SERVER
AC_SERVER_HOME=/export/home/actuate










On May 27, 7:37 am, Oscar del Rio <del...@mie.utoronto.ca> wrote:
> ravyka...@gmail.com wrote:
> > This is what worked:
> > AC_SERVER_HOME="/export/home/actuate";export AC_SERVER_HOME
>
> You can save a couple keystrokes:
>
> AC_SERVER_HOME=/export/home/actuate export AC_SERVER_HOME
>
> Note there's no semicolon so it is a single shell command
> (homework: *why* does it work without the semicolon?)
>
> You don't need quotes unless there are spaces in the value.


0
Reply Latheef 5/28/2007 5:08:28 AM

12 Replies
1635 Views

(page loaded in 0.097 seconds)

Similiar Articles:


















7/23/2012 7:31:00 AM


Reply: