🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.apple2.gno
Article #276

Re: Reading shell variables from a program.

#276
From: Andre John Kostur
Date: Tue, 17 Nov 1992 02:07
25 lines
1122 bytes
In article <1e8tnnINN3bf@charnel.ecst.csuchico.edu> jamesb@ecst.csuchico.edu (James L. Brookes) writes:
>I looked through the documentation at hand (as well as several manpages on
>the unix box here) but I couldn't figure out how to read a shell variable
>from within a program.  

Ooops... my last post was useless... what it should say:

char *getenv(char *);

Where you pass in a pointer to a string which contains the name of the
variable, and it returns a pointer to the value of that variable

ie:

char *termtype;

termtype = getenv("TERM");


      ^ 
     ' ` 
  **'   `**         Andre Kostur
 ***  _  ***
  *''***``*         akostur@sfu.ca 
   `     ' 
Technical Details
Message-ID: <1992Nov17.020734.3248@sfu.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!cs.ubc.ca!newsserver.sfu.ca!akostur
References: <1e8tnnINN3bf@charnel.ecst.csuchico.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.apple2.gno
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!cs.ubc.ca!newsserver.sfu.ca!akostur
From: akostur@fraser.sfu.ca (Andre John Kostur)
Subject: Re: Reading shell variables from a program.
Message-ID: <1992Nov17.020734.3248@sfu.ca>
Sender: news@sfu.ca
Organization: Simon Fraser University, Burnaby, B.C., Canada
References: <1e8tnnINN3bf@charnel.ecst.csuchico.edu>
Date: Tue, 17 Nov 1992 02:07:34 GMT
Lines: 25