home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!saffron.CS.Berkeley.EDU!joel
- From: joel@saffron.CS.Berkeley.EDU (Joel A. Fine)
- Newsgroups: comp.lang.tcl
- Subject: Re: Help on reading shell variable/environment
- Date: 15 Dec 1992 22:39:11 GMT
- Organization: University of California, Berkeley
- Lines: 23
- Distribution: world
- Message-ID: <1glmqfINNfv5@agate.berkeley.edu>
- References: <1992Dec15.204940.15394@bnr.ca>
- NNTP-Posting-Host: saffron.cs.berkeley.edu
- Keywords: TCL/TK,variable,environment,shell
-
- In article <1992Dec15.204940.15394@bnr.ca>, tdoan@bnr.ca (Tuan Doan) writes:
- |> Does anyone know of a way to read shell variable or environment variable
- |> inside TCL/TK? I need to access the TERM variable so that to prevent my
- |> TCL/TK program from being run when the user is not in an X window environment.
-
- wish: echo $env(TERM)
- xterm
-
- |> Also, is there an easy way to implement set operations in TCL/TK?
-
- In extended tcl (which you can get from barkley.berkeley.edu), there's union
- and intersect:
-
- tclX> set a [list a b c]
- tclX> set b [list b c d]
- tclX> union $a $b
- a b c d
- tclX> intersect $a $b
- b c
-
-
- - Joel Fine
-
-