Path: news.daimi.aau.dk!Morten.Grouleff From: Morten Grouleff Newsgroups: daimi.beta,daimi.dsa Subject: Re: Environment-variabler i BETA... Date: 10 Feb 1998 15:09:43 +0100 Organization: DAIMI, Computer Science Dept. of Aarhus Univ. Lines: 33 Message-ID: References: <34E05331.3CA3@daimi.aau.dk> NNTP-Posting-Host: sunspot.daimi.aau.dk Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Gnus v5.5/Emacs 19.34 Xref: news.daimi.aau.dk daimi.beta:10316 daimi.dsa:10419 Steffen Anders Furholm writes: > Kan man på en eller anden måde få fat i værdierne af environment > variabler (altså variabler sat med "setenv" i en unix-prompt) i BETA? > (lige som man kan i c med getenv() og setenv())... Se '~beta/sysutils/v1.6/envstring': expandEnvVar: (* Expands text containing substrings of the form $(VAR) to the value * of the corresponding unix-environment variable. * * E.g., if the unix-command printenv says * HOME=/users/cn * SHELL=/bin/csh * USER=cn * * then is expanded to * * $(SHELL) /bin/csh * $(HOME)!$(USER) /users/cn!cn * * (if an environment variable is specified, which is not set, then the * virtual pattern defaultvalue is called. This allows the programmer to * specify default-values for not-set environment variables. *) Mvh. -- ** Morten Grouleff ** ** Earthworm Jim PC: ** ** Life is what happens to you while you're ** ** busy making other plans - John Lennon **