getting environment variables from c shell using Bourne shell

getting environment variables from c shell using Bourne shell

Post by Biliba » Mon, 13 Oct 1997 04:00:00



Hello all
        This problem started from the execution of xdm.  I use to
login without any X-window interface, run C-shell, set the variables
and environments, start openwin then start olwm.  The menu of the olwm
contains an entry of a variable set in the C-shell, eg

        "Menu"        MENU    $MENU/something_or_rather

        now I'm using xdm, hence running openwin, then olwm, then set
C-shell variables.  The menu doesn't seem to pick up the $MENU
variable.  But when I do a "setenv" the MENU variable is set.
        I was also reading the man pages for olwm, it saids that the
men line is interpretted by putting it through Bourne shell.  So could
it be that the variables set using C-shell cannot be read by Bourne
shell?  Or could it be that I have to set the environment before olwm
starts?  (This is unlikely, as the menu can be read if the menu file
is changed)
        I'm baffled!  Any help will be appreciated

        Terrance

 
 
 

getting environment variables from c shell using Bourne shell

Post by Barry Margoli » Fri, 17 Oct 1997 04:00:00




>    I was also reading the man pages for olwm, it saids that the
>men line is interpretted by putting it through Bourne shell.  So could
>it be that the variables set using C-shell cannot be read by Bourne
>shell?  Or could it be that I have to set the environment before olwm
>starts?  (This is unlikely, as the menu can be read if the menu file
>is changed)

You have to set the environment before starting olwm.  When you start olwm
it inherits a copy of the environment variables that were in effect at the
time.  It won't see any changes that you make to the environment after
that.  The menu can be re-read, but it will still use only the original
environment variable settings.

--

GTE Internetworking, Powered by BBN, Cambridge, MA
Support the anti-spam movement; see <http://www.cauce.org/>
Please don't send technical questions directly to me, post them to newsgroups.

 
 
 

getting environment variables from c shell using Bourne shell

Post by Zakir Shei » Sat, 18 Oct 1997 04:00:00


Hi all,

I have to change the IP address of our NIS+ root master server. I have
not found any documentation on this. Could anyone please suggest how I go
about doing this change ?

Thanks in advance,

Zakir Sheik

 
 
 

getting environment variables from c shell using Bourne shell

Post by Matus Uhl » Sat, 18 Oct 1997 04:00:00



> I have to change the IP address of our NIS+ root master server. I have
> not found any documentation on this. Could anyone please suggest how I go
> about doing this change ?

I already did that and now I have problems... all NIS_COLD_START files point
to removed IP... I'd like to find the answer too...

iirc i've seen I can convert NIS replica to NIS master. so I created replica
and my NIS+ works but I can't change it; I'd like to know how to convert
replica to master... can anybody help ?
Thanks...
--
 Matus "fantomas" Uhlar, sysadmin of one server at SANET Kosice, Slovakia

 And don't forget: I work for SANET, but talk for myself, dude... ;-)

 
 
 

1. Numbered environment variable in Bourne shell

        Hi,

I am trying to have several environment variables with names containing
a variable number.  I need that in order to preconnect logical units in
Fortran on a Fujitsu supercomputer.  So what I tried in Bourne shell
is the following:

for i in 11 12 13 30 31 32 33 34 35 36 37 38 42 43 44 45 46 51
do
  fu$i=fort.$i ; export fu$i
done

This does not work and give the error message

fu11=fort.11: not found

and the same for every number in the list.  It seems that the Bourne
shell does not recognize the = sign when there is variable substitution
on the left of it.

I kind of solved the problem by running the script in Korn shell and
writing

export fu$i=fort.$i

which works as expected (as would "setenv fu$i fort.$i" in the C shell).
I only would like to know how would one do it in Bourne shell.

Any takers ?

--
Michel Beland, professionnel de recherche
CERCA (CEntre de Recherche en Calcul Applique)
5160, Boul. Decarie, bureau 400, Montreal (Quebec), Canada, H3X 2H9

2. Diamond Fireport 40 and RH6.0?

3. Trying to run nohup from Korn shell but getting Bourne shell errors

4. Need compiled htpasswd.exe for Win95

5. Light Speed Bourne Shell! (was: Bourne shell tricks)

6. Install of 2.0 Woes!

7. Bourne Shell compatible shells (was: Request: which shells)

8. Client/Server book?

9. Q: getting variable contents in bourne shell

10. modifying a bourne shell variable using sed: ain't workin'

11. Translating variables in text file to their values using bourne shell

12. Using Variables For Pattern In Bourne Shell case Statement

13. bourne shell variable within a variable